diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-04 22:24:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-05 14:35:31 +0100 |
| commit | 29844b3efd68ee102686e0ae6a04a926c1dbbbd8 (patch) | |
| tree | 7a8cd97644335364b7ab708e9a8e03a2da003bc6 /src/mxf.cc | |
| parent | 55686953bfecd42fac24bdf2668920954a8173be (diff) | |
Keep encryption context in MXFWriter.
Diffstat (limited to 'src/mxf.cc')
| -rw-r--r-- | src/mxf.cc | 17 |
1 files changed, 1 insertions, 16 deletions
@@ -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 |
