Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

eme_raw.cpp
Go to the documentation of this file.
1 /*
2 * (C) 2015,2016 Jack Lloyd
3 *
4 * Botan is released under the Simplified BSD License (see license.txt)
5 */
6
7 #include <botan/eme_raw.h>
8 #include <botan/internal/bit_ops.h>
9 #include <botan/internal/ct_utils.h>
10
11 namespace Botan {
12
13 secure_vector<uint8_t> EME_Raw::pad(const uint8_t in[], size_t in_length,
14 size_t,
15 RandomNumberGenerator&) const
16 {
17 return secure_vector<uint8_t>(in, in + in_length);
18 }
19
20 secure_vector<uint8_t> EME_Raw::unpad(uint8_t& valid_mask,
21 const uint8_t in[], size_t in_length) const
22 {
23 valid_mask = 0xFF;
24 return CT::strip_leading_zeros(in, in_length);
25 }
26
27 size_t EME_Raw::maximum_input_size(size_t keybits) const
28 {
29 return keybits / 8;
30 }
31 }
Botan::EME_Raw::maximum_input_size
size_t maximum_input_size(size_t i) const override
Definition: eme_raw.cpp:27
Botan
Definition: alg_id.cpp:13
Botan::CT::strip_leading_zeros
secure_vector< uint8_t > strip_leading_zeros(const uint8_t in[], size_t length)
Definition: ct_utils.h:186