diff options
author | Jack Lloyd <[email protected]> | 2017-06-09 09:56:49 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-06-09 09:56:57 -0400 |
commit | 0e32198d21829c83eb27cfac34bc652e37f37f6c (patch) | |
tree | d106273dfa8fafbd3a72c57bacf207d6cdabae36 /src | |
parent | 5b2fe4a6d4dfdb28af364eec86a407327e64d1d7 (diff) | |
parent | 3059cbe059eebaf75cdd8353e2682fdeb560823a (diff) |
Merge GH #1070 Check that key was set in OCB::encrypt
[ci skip]
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/modes/aead/ocb/ocb.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/modes/aead/ocb/ocb.cpp b/src/lib/modes/aead/ocb/ocb.cpp index 84787ad38..e1fae911b 100644 --- a/src/lib/modes/aead/ocb/ocb.cpp +++ b/src/lib/modes/aead/ocb/ocb.cpp @@ -241,6 +241,8 @@ void OCB_Encryption::encrypt(uint8_t buffer[], size_t blocks) const size_t proc_blocks = std::min(blocks, par_blocks); const size_t proc_bytes = proc_blocks * 16; + BOTAN_ASSERT(m_L, "A key was set"); + const auto& offsets = m_L->compute_offsets(m_offset, m_block_index, proc_blocks); xor_buf(m_checksum.data(), buffer, proc_bytes); |