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

Method InitGCMContentKey

libcppcryptfs/config/cryptconfig.cpp:1075–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1073}
1074
1075bool CryptConfig::InitGCMContentKey(const BYTE *key)
1076{
1077 if (!m_HKDF)
1078 return true;
1079
1080 m_pGcmContentKey = new LockZeroBuffer<BYTE>(MASTER_KEY_LEN, false);
1081
1082 if (!m_pGcmContentKey->IsLocked())
1083 return false;
1084
1085 m_keybuf_manager.RegisterBuf(m_pGcmContentKey);
1086
1087
1088 if (!hkdfDerive(key, MASTER_KEY_LEN, m_pGcmContentKey->m_buf, m_pGcmContentKey->m_len, hkdfInfoGCMContent))
1089 return false;
1090
1091 return true;
1092}
1093

Callers 1

decrypt_keyMethod · 0.95

Calls 3

hkdfDeriveFunction · 0.85
IsLockedMethod · 0.80
RegisterBufMethod · 0.45

Tested by

no test coverage detected