Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

oaep.h
Go to the documentation of this file.
1 /*
2 * OAEP
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7
8 #ifndef BOTAN_OAEP_H__
9 #define BOTAN_OAEP_H__
10
11 #include <botan/eme.h>
12 #include <botan/hash.h>
13
14 namespace Botan {
15
16 /**
17 * OAEP (called EME1 in IEEE 1363 and in earlier versions of the library)
18 */
19 class BOTAN_DLL OAEP final : public EME
20 {
21 public:
22 size_t maximum_input_size(size_t) const override;
23
24 /**
25 * @param hash function to use for hashing (takes ownership)
26 * @param P an optional label. Normally empty.
27 */
28 OAEP(HashFunction* hash, const std::string& P = "");
29 private:
30 secure_vector<uint8_t> pad(const uint8_t in[],
31 size_t in_length,
32 size_t key_length,
33 RandomNumberGenerator& rng) const override;
34
35 secure_vector<uint8_t> unpad(uint8_t& valid_mask,
36 const uint8_t in[],
37 size_t in_len) const override;
38
39 secure_vector<uint8_t> m_Phash;
40 std::unique_ptr<HashFunction> m_hash;
41 };
42
43 }
44
45 #endif
Botan::RandomNumberGenerator
Definition: rng.h:25
Botan::OAEP
Definition: oaep.h:19
Botan::EME
Definition: eme.h:19
Botan::secure_vector
std::vector< T, secure_allocator< T >> secure_vector
Definition: secmem.h:121
Botan
Definition: alg_id.cpp:13
Botan::HashFunction
Definition: hash.h:19
m_hash
std::unique_ptr< HashFunction > m_hash
Definition: tpm.cpp:439
hash
MechanismType hash
Definition: p11_mechanism.cpp:63