qca
exceptn.cpp
Go to the documentation of this file.00001 /* 00002 Copyright (C) 1999-2007 The Botan Project. All rights reserved. 00003 00004 Redistribution and use in source and binary forms, for any use, with or without 00005 modification, is permitted provided that the following conditions are met: 00006 00007 1. Redistributions of source code must retain the above copyright notice, this 00008 list of conditions, and the following disclaimer. 00009 00010 2. Redistributions in binary form must reproduce the above copyright notice, 00011 this list of conditions, and the following disclaimer in the documentation 00012 and/or other materials provided with the distribution. 00013 00014 THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) "AS IS" AND ANY EXPRESS OR IMPLIED 00015 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00016 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. 00017 00018 IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE FOR ANY DIRECT, 00019 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00020 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00021 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00022 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00023 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 00024 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00025 */ 00026 // LICENSEHEADER_END 00027 namespace QCA { // WRAPNS_LINE 00028 /************************************************* 00029 * Exceptions Source File * 00030 * (C) 1999-2007 The Botan Project * 00031 *************************************************/ 00032 00033 } // WRAPNS_LINE 00034 #include <botan/exceptn.h> 00035 namespace QCA { // WRAPNS_LINE 00036 } // WRAPNS_LINE 00037 #include <botan/parsing.h> 00038 namespace QCA { // WRAPNS_LINE 00039 00040 namespace Botan { 00041 00042 /************************************************* 00043 * Constructor for Invalid_Key_Length * 00044 *************************************************/ 00045 Invalid_Key_Length::Invalid_Key_Length(const std::string& name, u32bit length) 00046 { 00047 set_msg(name + " cannot accept a key of length " + to_string(length)); 00048 } 00049 00050 /************************************************* 00051 * Constructor for Invalid_Block_Size * 00052 *************************************************/ 00053 Invalid_Block_Size::Invalid_Block_Size(const std::string& mode, 00054 const std::string& pad) 00055 { 00056 set_msg("Padding method " + pad + " cannot be used with " + mode); 00057 } 00058 00059 /************************************************* 00060 * Constructor for Invalid_IV_Length * 00061 *************************************************/ 00062 Invalid_IV_Length::Invalid_IV_Length(const std::string& mode, u32bit bad_len) 00063 { 00064 set_msg("IV length " + to_string(bad_len) + " is invalid for " + mode); 00065 } 00066 00067 /************************************************* 00068 * Constructor for Invalid_Message_Number * 00069 *************************************************/ 00070 Invalid_Message_Number::Invalid_Message_Number(const std::string& where, 00071 u32bit message_no) 00072 { 00073 set_msg("Pipe::" + where + ": Invalid message number " + 00074 to_string(message_no)); 00075 } 00076 00077 /************************************************* 00078 * Constructor for Algorithm_Not_Found * 00079 *************************************************/ 00080 Algorithm_Not_Found::Algorithm_Not_Found(const std::string& name) 00081 { 00082 set_msg("Could not find any algorithm named \"" + name + "\""); 00083 } 00084 00085 /************************************************* 00086 * Constructor for Invalid_Algorithm_Name * 00087 *************************************************/ 00088 Invalid_Algorithm_Name::Invalid_Algorithm_Name(const std::string& name) 00089 { 00090 set_msg("Invalid algorithm name: " + name); 00091 } 00092 00093 /************************************************* 00094 * Constructor for Config_Error * 00095 *************************************************/ 00096 Config_Error::Config_Error(const std::string& err, u32bit line) 00097 { 00098 set_msg("Config error at line " + to_string(line) + ": " + err); 00099 } 00100 00101 } 00102 } // WRAPNS_LINE
KDE 4.4 API Reference