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/emsa4.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/emsa4.cpp')
-rw-r--r-- | src/emsa4.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emsa4.cpp b/src/emsa4.cpp index 075089239..e541b9e7d 100644 --- a/src/emsa4.cpp +++ b/src/emsa4.cpp @@ -36,9 +36,9 @@ SecureVector<byte> EMSA4::encoding_of(const MemoryRegion<byte>& msg, const u32bit HASH_SIZE = hash->OUTPUT_LENGTH; if(msg.size() != HASH_SIZE) - throw Invalid_Argument("EMSA4::encoding_of: Bad input length"); + throw Encoding_Error("EMSA4::encoding_of: Bad input length"); if(output_bits < 8*HASH_SIZE + 8*SALT_SIZE + 9) - throw Invalid_Argument("EMSA4::encoding_of: Output length is too small"); + throw Encoding_Error("EMSA4::encoding_of: Output length is too small"); const u32bit output_length = (output_bits + 7) / 8; |