aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/cbc
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-10-23 13:58:52 -0400
committerJack Lloyd <[email protected]>2018-10-23 13:58:52 -0400
commitf97bf16fe68446bf83f447cc010b271cbd4fcfd6 (patch)
treea54381d8aef05d17f1d8da0832c43ed98955b4e3 /src/lib/modes/cbc
parentf6672d37d22fb0690778a522e7653bc78809e3ef (diff)
Use more informative error message for invalid CBC padding
GH #1714
Diffstat (limited to 'src/lib/modes/cbc')
-rw-r--r--src/lib/modes/cbc/cbc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/modes/cbc/cbc.cpp b/src/lib/modes/cbc/cbc.cpp
index c01fc4328..aa73eb884 100644
--- a/src/lib/modes/cbc/cbc.cpp
+++ b/src/lib/modes/cbc/cbc.cpp
@@ -256,7 +256,7 @@ void CBC_Decryption::finish(secure_vector<uint8_t>& buffer, size_t offset)
buffer.resize(buffer.size() - pad_bytes); // remove padding
if(pad_bytes == 0 && padding().name() != "NoPadding")
{
- throw Decoding_Error(name());
+ throw Decoding_Error("Invalid CBC padding");
}
}