diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-03-06 01:15:43 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-03-13 22:29:01 +0000 |
| commit | 380d7af94562883cdcaa60726d0ffa36f3dab304 (patch) | |
| tree | a36f4828d8ebf54efcf0f3155f49b54b430b67f6 /src/asset_reader.h | |
| parent | 0e29e68e94daade47167ac5bc6b51362ef02b5c3 (diff) | |
Merge EncryptionContext with DecryptionContext and use HMAC when decrypting.
Diffstat (limited to 'src/asset_reader.h')
| -rw-r--r-- | src/asset_reader.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/asset_reader.h b/src/asset_reader.h index eaf2721a..dbd2761b 100644 --- a/src/asset_reader.h +++ b/src/asset_reader.h @@ -36,21 +36,19 @@ #include "dcp_assert.h" #include "asset.h" -#include "decryption_context.h" +#include "crypto_context.h" #include <asdcp/AS_DCP.h> #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> namespace dcp { -class DecryptionContext; - template <class R, class F> class AssetReader : public boost::noncopyable { public: - explicit AssetReader (Asset const * asset, boost::optional<Key> key) - : _decryption_context (new DecryptionContext (key)) + explicit AssetReader (Asset const * asset, boost::optional<Key> key, Standard standard) + : _crypto_context (new DecryptionContext (key, standard)) { _reader = new R (); DCP_ASSERT (asset->file ()); @@ -68,12 +66,12 @@ public: boost::shared_ptr<const F> get_frame (int n) const { - return boost::shared_ptr<const F> (new F (_reader, n, _decryption_context)); + return boost::shared_ptr<const F> (new F (_reader, n, _crypto_context)); } protected: R* _reader; - boost::shared_ptr<DecryptionContext> _decryption_context; + boost::shared_ptr<DecryptionContext> _crypto_context; }; } |
