diff options
Diffstat (limited to 'src/lib/pubkey/mceies/mceies.cpp')
-rw-r--r-- | src/lib/pubkey/mceies/mceies.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/pubkey/mceies/mceies.cpp b/src/lib/pubkey/mceies/mceies.cpp index 301c5dda4..e83fa257e 100644 --- a/src/lib/pubkey/mceies/mceies.cpp +++ b/src/lib/pubkey/mceies/mceies.cpp @@ -48,7 +48,7 @@ mceies_encrypt(const McEliece_PublicKey& pubkey, std::unique_ptr<AEAD_Mode> aead(get_aead(algo, ENCRYPTION)); if(!aead) - throw std::runtime_error("mce_encrypt unable to create AEAD instance '" + algo + "'"); + throw Exception("mce_encrypt unable to create AEAD instance '" + algo + "'"); const size_t nonce_len = aead->default_nonce_length(); @@ -81,12 +81,12 @@ mceies_decrypt(const McEliece_PrivateKey& privkey, std::unique_ptr<AEAD_Mode> aead(get_aead(algo, DECRYPTION)); if(!aead) - throw std::runtime_error("Unable to create AEAD instance '" + algo + "'"); + throw Exception("Unable to create AEAD instance '" + algo + "'"); const size_t nonce_len = aead->default_nonce_length(); if(ct_len < mce_code_bytes + nonce_len + aead->tag_size()) - throw std::runtime_error("Input message too small to be valid"); + throw Exception("Input message too small to be valid"); const secure_vector<byte> mce_key = kem_op.decrypt(ct, mce_code_bytes); @@ -105,7 +105,7 @@ mceies_decrypt(const McEliece_PrivateKey& privkey, } catch(std::exception& e) { - throw std::runtime_error("mce_decrypt failed: " + std::string(e.what())); + throw Exception("mce_decrypt failed: " + std::string(e.what())); } } |