Botan 1.10.17

emsa4.h
Go to the documentation of this file.
1 /*
2 * EMSA4
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_EMSA4_H__
9 #define BOTAN_EMSA4_H__
10
11 #include <botan/emsa.h>
12 #include <botan/hash.h>
13 #include <botan/kdf.h>
14
15 namespace Botan {
16
17 /**
18 * EMSA4 aka PSS-R
19 */
20 class BOTAN_DLL EMSA4 : public EMSA
21 {
22 public:
23 /**
24 * @param hash the hash object to use
25 */
26 EMSA4(HashFunction* hash);
27
28 /**
29 * @param hash the hash object to use
30 * @param salt_size the size of the salt to use in bytes
31 */
32 EMSA4(HashFunction* hash, size_t salt_size);
33
34 ~EMSA4() { delete hash; delete mgf; }
35 private:
36 void update(const byte[], size_t);
37 SecureVector<byte> raw_data();
38
39 SecureVector<byte> encoding_of(const MemoryRegion<byte>&, size_t,
40 RandomNumberGenerator& rng);
41 bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
42 size_t);
43
44 size_t SALT_SIZE;
45 HashFunction* hash;
46 const MGF* mgf;
47 };
48
49 }
50
51 #endif
Botan::EMSA4
Definition: emsa4.h:20
Botan::RandomNumberGenerator
Definition: rng.h:20
Botan::MGF
Definition: kdf.h:94
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::EMSA
Definition: emsa.h:19
Botan::MemoryRegion< byte >
Botan
Definition: algo_base.h:14
Botan::EMSA4::~EMSA4
~EMSA4()
Definition: emsa4.h:34
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< byte >