blob: 44269d13eea2edbb38aa031a629b1673574b949d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/*************************************************
* Exceptions Source File *
* (C) 1999-2008 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);
}
}
|