diff options
author | lloyd <[email protected]> | 2008-09-29 00:15:14 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-29 00:15:14 +0000 |
commit | 68d3d539ad7752dc80c20c1a2ade909b1a4c4a6e (patch) | |
tree | c7e588d28427960c95eca9900844d5bf36c079df /src/core/exceptn.cpp | |
parent | 8269e2897e0a652bbd949d38b74873976a98adeb (diff) |
Move what is left of the uncategorized library to 'core'. There is still
a lot of public key stuff in here that needs to be extracted however,
and probably 2-3 other modules worth of stuff to split off (engines, etc)
Diffstat (limited to 'src/core/exceptn.cpp')
-rw-r--r-- | src/core/exceptn.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/core/exceptn.cpp b/src/core/exceptn.cpp new file mode 100644 index 000000000..29357afa5 --- /dev/null +++ b/src/core/exceptn.cpp @@ -0,0 +1,60 @@ +/************************************************* +* Exceptions Source File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#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 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); + } + +} |