diff options
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.cpp | 2 | ||||
-rw-r--r-- | src/lib/modes/cbc/cbc.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index 457c4831f..75768d851 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -150,7 +150,7 @@ void GCM_Decryption::finish(secure_vector<uint8_t>& buffer, size_t offset) uint8_t* buf = buffer.data() + offset; if(sz < tag_size()) - throw Exception("Insufficient input for GCM decryption, tag missing"); + throw Decoding_Error("Insufficient input for GCM decryption, tag missing"); const size_t remaining = sz - tag_size(); diff --git a/src/lib/modes/cbc/cbc.cpp b/src/lib/modes/cbc/cbc.cpp index aa73eb884..a4af7f0bf 100644 --- a/src/lib/modes/cbc/cbc.cpp +++ b/src/lib/modes/cbc/cbc.cpp @@ -136,7 +136,7 @@ void CBC_Encryption::finish(secure_vector<uint8_t>& buffer, size_t offset) padding().add_padding(buffer, bytes_in_final_block, BS); if((buffer.size()-offset) % BS) - throw Exception("Did not pad to full block size in " + name()); + throw Internal_Error("Did not pad to full block size in " + name()); update(buffer, offset); } |