aboutsummaryrefslogtreecommitdiffstats
path: root/src/emsa3.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-30 06:13:18 +0000
committerlloyd <[email protected]>2006-09-30 06:13:18 +0000
commite52d871393f180042822950966597d160b9adf70 (patch)
treef9ae4e2b368eb7390da2fffc6aefbc4de0a6ec4d /src/emsa3.cpp
parent2d823dfaee1f3fe329f5b2eaf79eb3d9c27943a9 (diff)
Throw Encoding_Error instead of Invalid_Argument if a signature encoding
operation fails for some reason (typically parameters that the scheme can't handle).
Diffstat (limited to 'src/emsa3.cpp')
-rw-r--r--src/emsa3.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emsa3.cpp b/src/emsa3.cpp
index 566e55c62..dc55d16ba 100644
--- a/src/emsa3.cpp
+++ b/src/emsa3.cpp
@@ -32,11 +32,11 @@ SecureVector<byte> EMSA3::encoding_of(const MemoryRegion<byte>& msg,
u32bit output_bits)
{
if(msg.size() != hash->OUTPUT_LENGTH)
- throw Invalid_Argument("EMSA3::encoding_of: Bad input length");
+ throw Encoding_Error("EMSA3::encoding_of: Bad input length");
u32bit output_length = output_bits / 8;
if(output_length < hash_id.size() + hash->OUTPUT_LENGTH + 10)
- throw Invalid_Argument("EMSA3::pad: Output length is too small");
+ throw Encoding_Error("EMSA3::pad: Output length is too small");
SecureVector<byte> T(output_length);
const u32bit P_LENGTH = output_length - hash->OUTPUT_LENGTH -