pk_misc.h

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

H
72
字号
/************************************************** Miscellaneous PK Functions Header File         ** (C) 1999-2002 The Botan Project                **************************************************/#ifndef BOTAN_PUBKEY_MISC_H__#define BOTAN_PUBKEY_MISC_H__#include <botan/base.h>namespace Botan {/************************************************** Encoding Method for Encryption                 **************************************************/class EME   {   public:      virtual u32bit maximum_input_size(u32bit) const = 0;      SecureVector<byte> encode(const byte[], u32bit, u32bit) const;      SecureVector<byte> encode(const SecureVector<byte>&, u32bit) const;      SecureVector<byte> decode(const byte[], u32bit, u32bit) const;      SecureVector<byte> decode(const SecureVector<byte>&, u32bit) const;      virtual ~EME() {}   private:      virtual SecureVector<byte> pad(const byte[], u32bit, u32bit) const = 0;      virtual SecureVector<byte> unpad(const byte[], u32bit, u32bit) const = 0;   };/************************************************** Encoding Method for Signatures, Appendix       **************************************************/class EMSA   {   public:      virtual void update(const byte[], u32bit) = 0;      virtual SecureVector<byte> raw_data() = 0;      virtual SecureVector<byte> encoding_of(const SecureVector<byte>&,                                             u32bit) = 0;      virtual bool verify(const SecureVector<byte>&, const SecureVector<byte>&,                          u32bit) throw();      virtual ~EMSA() {}   };/************************************************** Mask Generation Function                       **************************************************/class MGF   {   public:      virtual void mask(const byte[], u32bit, byte[], u32bit) const = 0;      virtual ~MGF() {}   };/************************************************** Key Derivation Function                        **************************************************/class KDF   {   public:      SymmetricKey derive_key(const byte[], u32bit, u32bit) const;      SymmetricKey derive_key(const SecureVector<byte>&, u32bit) const;      virtual ~KDF() {}   private:      virtual SymmetricKey derive(const byte[], u32bit, u32bit) const = 0;   };}#endif

⌨️ 快捷键说明

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