diff options
Diffstat (limited to 'src/pk_pad/emsa4/emsa4.h')
-rw-r--r-- | src/pk_pad/emsa4/emsa4.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h new file mode 100644 index 000000000..f4d4a4b6d --- /dev/null +++ b/src/pk_pad/emsa4/emsa4.h @@ -0,0 +1,38 @@ +/************************************************* +* EMSA4 Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_EMSA4_H__ +#define BOTAN_EMSA4_H__ + +#include <botan/pk_util.h> + +namespace Botan { + +/************************************************* +* EMSA4 * +*************************************************/ +class BOTAN_DLL EMSA4 : public EMSA + { + public: + EMSA4(const std::string&, const std::string&); + EMSA4(const std::string&, const std::string&, u32bit); + ~EMSA4() { delete hash; delete mgf; } + private: + void update(const byte[], u32bit); + SecureVector<byte> raw_data(); + + SecureVector<byte> encoding_of(const MemoryRegion<byte>&, u32bit, + RandomNumberGenerator& rng); + bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&, + u32bit) throw(); + + const u32bit SALT_SIZE; + HashFunction* hash; + const MGF* mgf; + }; + +} + +#endif |