| 39 | class CryptConfig; |
| 40 | |
| 41 | class SivContext { |
| 42 | |
| 43 | public: |
| 44 | |
| 45 | bool SetKey(const unsigned char *key, int keylen, bool hkdf, CryptConfig *pConfig); // keylen must be 32 |
| 46 | // disallow copying |
| 47 | SivContext(SivContext const&) = delete; |
| 48 | void operator=(SivContext const&) = delete; |
| 49 | SivContext(); |
| 50 | virtual ~SivContext(); |
| 51 | |
| 52 | const AES_KEY *GetEncryptKeyLow() const { return m_pKeys ? &m_pKeys->m_buf[SIV_KEY_ENCRYPT_LOW_INDEX] : NULL; }; |
| 53 | const AES_KEY *GetDecryptKeyLow() const { return m_pKeys ? &m_pKeys->m_buf[SIV_KEY_DECRYPT_LOW_INDEX] : NULL; }; |
| 54 | const AES_KEY *GetEncryptKeyHigh() const { return m_pKeys ? &m_pKeys->m_buf[SIV_KEY_ENCRYPT_HIGH_INDEX] : NULL; }; |
| 55 | const AES_KEY *GetDecryptKeyHigh() const { return m_pKeys ? &m_pKeys->m_buf[SIV_KEY_DECRYPT_HIGH_INDEX] : NULL; }; |
| 56 | |
| 57 | private: |
| 58 | LockZeroBuffer<AES_KEY> *m_pKeys; |
| 59 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected