diff options
author | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
commit | a2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch) | |
tree | ad3d6c4fcc8dd0f403f8105598943616246fe172 /src/exceptn.cpp |
Initial checkin1.5.6
Diffstat (limited to 'src/exceptn.cpp')
-rw-r--r-- | src/exceptn.cpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/exceptn.cpp b/src/exceptn.cpp new file mode 100644 index 000000000..4c72e9ef3 --- /dev/null +++ b/src/exceptn.cpp @@ -0,0 +1,70 @@ +/************************************************* +* Exceptions Source File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#include <botan/exceptn.h> +#include <botan/parsing.h> + +namespace Botan { + +/************************************************* +* Constructor for Invalid_Key_Length * +*************************************************/ +Invalid_Key_Length::Invalid_Key_Length(const std::string& name, u32bit length) + { + set_msg(name + " cannot accept a key of length " + to_string(length)); + } + +/************************************************* +* Constructor for Invalid_Block_Size * +*************************************************/ +Invalid_Block_Size::Invalid_Block_Size(const std::string& mode, + const std::string& pad) + { + set_msg("Padding method " + pad + " cannot be used with " + mode); + } + +/************************************************* +* Constructor for Invalid_IV_Length * +*************************************************/ +Invalid_IV_Length::Invalid_IV_Length(const std::string& mode, u32bit bad_len) + { + set_msg("IV length " + to_string(bad_len) + " is invalid for " + mode); + } + +/************************************************* +* Constructor for Invalid_Message_Number * +*************************************************/ +Invalid_Message_Number::Invalid_Message_Number(const std::string& where, + u32bit message_no) + { + set_msg("Pipe::" + where + ": Invalid message number " + + to_string(message_no)); + } + +/************************************************* +* Constructor for Algorithm_Not_Found * +*************************************************/ +Algorithm_Not_Found::Algorithm_Not_Found(const std::string& name) + { + set_msg("Could not find any algorithm named \"" + name + "\""); + } + +/************************************************* +* Constructor for Invalid_Algorithm_Name * +*************************************************/ +Invalid_Algorithm_Name::Invalid_Algorithm_Name(const std::string& name) + { + set_msg("Invalid algorithm name: " + name); + } + +/************************************************* +* Constructor for Config_Error * +*************************************************/ +Config_Error::Config_Error(const std::string& err, u32bit line) + { + set_msg("Config error at line " + to_string(line) + ": " + err); + } + +} |