diff options
Diffstat (limited to 'src/lib/block/blowfish/blowfish.cpp')
-rw-r--r-- | src/lib/block/blowfish/blowfish.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/block/blowfish/blowfish.cpp b/src/lib/block/blowfish/blowfish.cpp index 68d73cafd..c2634bba4 100644 --- a/src/lib/block/blowfish/blowfish.cpp +++ b/src/lib/block/blowfish/blowfish.cpp @@ -197,6 +197,8 @@ const uint32_t S_INIT[1024] = { */ void Blowfish::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const { + verify_key_set(m_S.empty() == false); + const uint32_t* S1 = &m_S[0]; const uint32_t* S2 = &m_S[256]; const uint32_t* S3 = &m_S[512]; @@ -229,6 +231,8 @@ void Blowfish::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const */ void Blowfish::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const { + verify_key_set(m_S.empty() == false); + const uint32_t* S1 = &m_S[0]; const uint32_t* S2 = &m_S[256]; const uint32_t* S3 = &m_S[512]; |