diff options
author | lloyd <[email protected]> | 2008-11-10 14:59:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 14:59:08 +0000 |
commit | 9ebe6ec5d24c6b28eb8d44b4204e42dda600fb4d (patch) | |
tree | 7f7a26de2d6ec50a12426b37359551618a194f52 /src/pk_pad/eme.h | |
parent | 52fa0b875ad616dd997ac6253f92ffb18812209c (diff) |
Split pk_pad.h into eme.h and emsa.h
Diffstat (limited to 'src/pk_pad/eme.h')
-rw-r--r-- | src/pk_pad/eme.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/pk_pad/eme.h b/src/pk_pad/eme.h new file mode 100644 index 000000000..fd759bd10 --- /dev/null +++ b/src/pk_pad/eme.h @@ -0,0 +1,40 @@ +/************************************************* +* EME Classes Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__ +#define BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__ + +#include <botan/secmem.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; + }; + +} + +#endif |