Botan: src/pk_pad/emsa2/emsa2.h Source File

Botan 1.10.16

emsa2.h
Go to the documentation of this file.
1 /*
2 * EMSA2
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_EMSA2_H__
9 #define BOTAN_EMSA2_H__
10
11 #include <botan/emsa.h>
12 #include <botan/hash.h>
13
14 namespace Botan {
15
16 /**
17 * EMSA2 from IEEE 1363
18 * Useful for Rabin-Williams
19 */
20 class BOTAN_DLL EMSA2 : public EMSA
21 {
22 public:
23 /**
24 * @param hash the hash object to use
25 */
26 EMSA2(HashFunction* hash);
27 ~EMSA2() { delete hash; }
28 private:
29 void update(const byte[], size_t);
30 SecureVector<byte> raw_data();
31
32 SecureVector<byte> encoding_of(const MemoryRegion<byte>&, size_t,
33 RandomNumberGenerator& rng);
34
35 bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
36 size_t);
37
38 SecureVector<byte> empty_hash;
39 HashFunction* hash;
40 byte hash_id;
41 };
42
43 }
44
45 #endif
Botan::RandomNumberGenerator
Definition: rng.h:20
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::EMSA2
Definition: emsa2.h:20
Botan::EMSA
Definition: emsa.h:19
Botan::MemoryRegion< byte >
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::EMSA2::~EMSA2
~EMSA2()
Definition: emsa2.h:27
Botan::SecureVector< byte >