summaryrefslogtreecommitdiff
path: root/src/asdcp-wrap.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2014-09-21 13:27:43 +0000
committerjhurst <>2014-09-21 13:27:43 +0000
commitab3e3df49a9d4a44a3bf11211e31bdeac3ef7bcf (patch)
tree52023c92807dde6cb56835e957349327f1b9df0b /src/asdcp-wrap.cpp
parent8d24b6effb0377fc3041c2e024e7c5593caecc52 (diff)
imf bugs
date parse bug timed-text transform removed
Diffstat (limited to 'src/asdcp-wrap.cpp')
-rwxr-xr-xsrc/asdcp-wrap.cpp65
1 files changed, 51 insertions, 14 deletions
diff --git a/src/asdcp-wrap.cpp b/src/asdcp-wrap.cpp
index b87e4c7..0a749b0 100755
--- a/src/asdcp-wrap.cpp
+++ b/src/asdcp-wrap.cpp
@@ -99,6 +99,15 @@ public:
}
//
+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)
{
@@ -514,9 +523,13 @@ write_MPEG2_file(CommandOptions& Options)
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);
@@ -679,9 +692,13 @@ write_JP2K_S_file(CommandOptions& Options)
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);
@@ -814,9 +831,13 @@ write_JP2K_file(CommandOptions& Options)
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);
@@ -954,9 +975,13 @@ write_PCM_file(CommandOptions& Options)
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);
@@ -1122,9 +1147,13 @@ write_PCM_with_ATMOS_sync_file(CommandOptions& Options)
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);
@@ -1245,9 +1274,13 @@ write_timed_text_file(CommandOptions& Options)
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);
@@ -1365,9 +1398,13 @@ write_dolby_atmos_file(CommandOptions& Options)
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);