Botan  1.10.9
eme1.h
Go to the documentation of this file.
1 /*
2 * EME1
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_EME1_H__
9 #define BOTAN_EME1_H__
10 
11 #include <botan/eme.h>
12 #include <botan/kdf.h>
13 #include <botan/hash.h>
14 
15 namespace Botan {
16 
17 /**
18 * EME1, aka OAEP
19 */
20 class BOTAN_DLL EME1 : public EME
21  {
22  public:
23  size_t maximum_input_size(size_t) const;
24 
25  /**
26  * @param hash object to use for hashing (takes ownership)
27  * @param P an optional label. Normally empty.
28  */
29  EME1(HashFunction* hash, const std::string& P = "");
30 
31  ~EME1() { delete mgf; }
32  private:
33  SecureVector<byte> pad(const byte[], size_t, size_t,
34  RandomNumberGenerator&) const;
35  SecureVector<byte> unpad(const byte[], size_t, size_t) const;
36 
37  SecureVector<byte> Phash;
38  MGF* mgf;
39  };
40 
41 }
42 
43 #endif
Definition: kdf.h:94
unsigned char byte
Definition: types.h:22
Definition: eme.h:19
~EME1()
Definition: eme1.h:31