return; \
}
+//
+static void
+create_random_uuid(byte_t* uuidbuf)
+{
+ Kumu::UUID tmp_id;
+ GenRandomValue(tmp_id);
+ memcpy(uuidbuf, tmp_id.Value(), tmp_id.Size());
+}
+
//
void
banner(FILE* stream = stdout)
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ {
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
+ }
else
- RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
+ {
+ create_random_uuid(Info.CryptographicKeyID);
+ }
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);