diff options
| author | mikey <mikey@cinecert.com> | 2014-04-29 15:31:21 +0000 |
|---|---|---|
| committer | mikey <> | 2014-04-29 15:31:21 +0000 |
| commit | dd03f3ae2c71df2c4eb89804293e621777a050cf (patch) | |
| tree | 1e26fd0dab7c97aa82ce03f284ae449f0bb87b47 /src/AS_DCP_AES.cpp | |
| parent | 5fae5df9b1cf2990b0383e1b633bdab4476a9669 (diff) | |
added a note about AS-02 support.
Diffstat (limited to 'src/AS_DCP_AES.cpp')
| -rwxr-xr-x | src/AS_DCP_AES.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/AS_DCP_AES.cpp b/src/AS_DCP_AES.cpp index 51955f6..379e8ab 100755 --- a/src/AS_DCP_AES.cpp +++ b/src/AS_DCP_AES.cpp @@ -58,6 +58,7 @@ print_ssl_error() class ASDCP::AESEncContext::h__AESContext : public AES_KEY { public: + Kumu::SymmetricKey m_KeyBuf; byte_t m_IVec[CBC_BLOCK_SIZE]; }; @@ -76,8 +77,9 @@ ASDCP::AESEncContext::InitKey(const byte_t* key) return RESULT_INIT; m_Context = new h__AESContext; + m_Context->m_KeyBuf.Set(key); - if ( AES_set_encrypt_key(key, KEY_SIZE_BITS, m_Context) ) + if ( AES_set_encrypt_key(m_Context->m_KeyBuf.Value(), KEY_SIZE_BITS, m_Context) ) { print_ssl_error(); return RESULT_CRYPT_INIT; @@ -159,6 +161,7 @@ ASDCP::AESEncContext::EncryptBlock(const byte_t* pt_buf, byte_t* ct_buf, ui32_t class ASDCP::AESDecContext::h__AESContext : public AES_KEY { public: + Kumu::SymmetricKey m_KeyBuf; byte_t m_IVec[CBC_BLOCK_SIZE]; }; @@ -177,8 +180,9 @@ ASDCP::AESDecContext::InitKey(const byte_t* key) return RESULT_INIT; m_Context = new h__AESContext; + m_Context->m_KeyBuf.Set(key); - if ( AES_set_decrypt_key(key, KEY_SIZE_BITS, m_Context) ) + if ( AES_set_decrypt_key(m_Context->m_KeyBuf.Value(), KEY_SIZE_BITS, m_Context) ) { print_ssl_error(); return RESULT_CRYPT_INIT; |
