diff options
author | lloyd <[email protected]> | 2008-10-26 02:23:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-26 02:23:38 +0000 |
commit | dea1aa500fd7da2968448677fd628e8a4dddb6fb (patch) | |
tree | 48e401fe5cbb07a094b59ef742167ad5070a1dbe /src/core | |
parent | 17231ebbb95cc45cca50eabc4799c3058fc78ee9 (diff) |
Put pk_pad.{h,cpp} from core into pk_pad/ dir (cleaner I think)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/info.txt | 2 | ||||
-rw-r--r-- | src/core/pk_pad.cpp | 48 | ||||
-rw-r--r-- | src/core/pk_pad.h | 58 |
3 files changed, 0 insertions, 108 deletions
diff --git a/src/core/info.txt b/src/core/info.txt index eed162c44..82376a8b8 100644 --- a/src/core/info.txt +++ b/src/core/info.txt @@ -32,8 +32,6 @@ exceptn.h mem_pool.cpp mem_pool.h mutex.h -pk_pad.cpp -pk_pad.h rng.cpp rng.h s2k.cpp diff --git a/src/core/pk_pad.cpp b/src/core/pk_pad.cpp deleted file mode 100644 index 23dc9a95b..000000000 --- a/src/core/pk_pad.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************* -* EME/EMSA Base Class Source File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ - -#include <botan/pk_pad.h> - -namespace Botan { - -/************************************************* -* Encode a message * -*************************************************/ -SecureVector<byte> EME::encode(const byte msg[], u32bit msg_len, - u32bit key_bits, - RandomNumberGenerator& rng) const - { - return pad(msg, msg_len, key_bits, rng); - } - -/************************************************* -* Encode a message * -*************************************************/ -SecureVector<byte> EME::encode(const MemoryRegion<byte>& msg, - u32bit key_bits, - RandomNumberGenerator& rng) const - { - return pad(msg, msg.size(), key_bits, rng); - } - -/************************************************* -* Decode a message * -*************************************************/ -SecureVector<byte> EME::decode(const byte msg[], u32bit msg_len, - u32bit key_bits) const - { - return unpad(msg, msg_len, key_bits); - } - -/************************************************* -* Decode a message * -*************************************************/ -SecureVector<byte> EME::decode(const MemoryRegion<byte>& msg, - u32bit key_bits) const - { - return unpad(msg, msg.size(), key_bits); - } - -} diff --git a/src/core/pk_pad.h b/src/core/pk_pad.h deleted file mode 100644 index ed1742155..000000000 --- a/src/core/pk_pad.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************* -* EME/EMSA Classes Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_PUBKEY_PAD_H__ -#define BOTAN_PUBKEY_PAD_H__ - -#include <botan/base.h> -#include <botan/rng.h> - -namespace Botan { - -/************************************************* -* Encoding Method for Encryption * -*************************************************/ -class BOTAN_DLL EME - { - public: - virtual u32bit maximum_input_size(u32bit) const = 0; - - SecureVector<byte> encode(const byte[], u32bit, u32bit, - RandomNumberGenerator&) const; - SecureVector<byte> encode(const MemoryRegion<byte>&, u32bit, - RandomNumberGenerator&) const; - - SecureVector<byte> decode(const byte[], u32bit, u32bit) const; - SecureVector<byte> decode(const MemoryRegion<byte>&, u32bit) const; - - virtual ~EME() {} - private: - virtual SecureVector<byte> pad(const byte[], u32bit, u32bit, - RandomNumberGenerator&) const = 0; - - virtual SecureVector<byte> unpad(const byte[], u32bit, u32bit) const = 0; - }; - -/************************************************* -* Encoding Method for Signatures, Appendix * -*************************************************/ -class BOTAN_DLL EMSA - { - public: - virtual void update(const byte[], u32bit) = 0; - virtual SecureVector<byte> raw_data() = 0; - - virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>&, - u32bit, - RandomNumberGenerator& rng) = 0; - - virtual bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&, - u32bit) throw() = 0; - virtual ~EMSA() {} - }; - -} - -#endif |