exceptn.cpp

来自「含有多种公开密钥算法、多种块加密、多种数据流加密、多种HASH函数、多种Chec」· C++ 代码 · 共 73 行

CPP
73
字号
/************************************************** Exceptions Source File                         ** (C) 1999-2002 The Botan Project                **************************************************/#include <botan/exceptn.h>#include <botan/util.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 Input_Too_Large                **************************************************/Input_Too_Large::Input_Too_Large(const std::string& where,                                 u32bit size, u32bit max)   {   set_msg("PK maximum input length of " + to_string(max) + " exceeded by "           + to_string(size) + " in " + where);   }/************************************************** Constructor for Invalid_Algorithm_Name         **************************************************/Invalid_Algorithm_Name::Invalid_Algorithm_Name(const std::string& name)   {   set_msg("Invalid algorithm name: " + name);   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?