summaryrefslogtreecommitdiff
path: root/src/mxf.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-04 22:24:26 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:35:31 +0100
commit29844b3efd68ee102686e0ae6a04a926c1dbbbd8 (patch)
tree7a8cd97644335364b7ab708e9a8e03a2da003bc6 /src/mxf.cc
parent55686953bfecd42fac24bdf2668920954a8173be (diff)
Keep encryption context in MXFWriter.
Diffstat (limited to 'src/mxf.cc')
-rw-r--r--src/mxf.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/mxf.cc b/src/mxf.cc
index 3a7080a9..d259bd97 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -43,15 +43,13 @@ using boost::dynamic_pointer_cast;
using namespace dcp;
MXF::MXF ()
- : _encryption_context (0)
- , _decryption_context (0)
+ : _decryption_context (0)
{
}
MXF::MXF (boost::filesystem::path file)
: Asset (file)
- , _encryption_context (0)
, _decryption_context (0)
{
@@ -59,7 +57,6 @@ MXF::MXF (boost::filesystem::path file)
MXF::~MXF ()
{
- delete _encryption_context;
delete _decryption_context;
}
@@ -132,18 +129,6 @@ MXF::set_key (Key key)
if (ASDCP_FAILURE (_decryption_context->InitKey (_key->value ()))) {
throw MiscError ("could not set up decryption context");
}
-
- _encryption_context = new ASDCP::AESEncContext;
- if (ASDCP_FAILURE (_encryption_context->InitKey (_key->value ()))) {
- throw MiscError ("could not set up encryption context");
- }
-
- uint8_t cbc_buffer[ASDCP::CBC_BLOCK_SIZE];
-
- Kumu::FortunaRNG rng;
- if (ASDCP_FAILURE (_encryption_context->SetIVec (rng.FillRandom (cbc_buffer, ASDCP::CBC_BLOCK_SIZE)))) {
- throw MiscError ("could not set up CBC initialization vector");
- }
}
void