diff options
author | lloyd <[email protected]> | 2006-09-30 06:13:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-30 06:13:18 +0000 |
commit | e52d871393f180042822950966597d160b9adf70 (patch) | |
tree | f9ae4e2b368eb7390da2fffc6aefbc4de0a6ec4d /src/emsa3.cpp | |
parent | 2d823dfaee1f3fe329f5b2eaf79eb3d9c27943a9 (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.cpp | 4 |
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 - |