MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / SivContext

Class SivContext

libcppcryptfs/crypt/siv.h:41–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39class CryptConfig;
40
41class SivContext {
42
43public:
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
57private:
58 LockZeroBuffer<AES_KEY> *m_pKeys;
59};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected