/src/botan/build/include/botan/internal/emsa_raw.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * EMSA-Raw |
3 | | * (C) 1999-2007 Jack Lloyd |
4 | | * |
5 | | * Botan is released under the Simplified BSD License (see license.txt) |
6 | | */ |
7 | | |
8 | | #ifndef BOTAN_EMSA_RAW_H_ |
9 | | #define BOTAN_EMSA_RAW_H_ |
10 | | |
11 | | #include <botan/internal/emsa.h> |
12 | | |
13 | | namespace Botan { |
14 | | |
15 | | /** |
16 | | * EMSA-Raw - sign inputs directly |
17 | | * Don't use this unless you know what you are doing. |
18 | | */ |
19 | | class EMSA_Raw final : public EMSA |
20 | | { |
21 | | public: |
22 | 0 | std::unique_ptr<EMSA> new_object() override { return std::make_unique<EMSA_Raw>(); } |
23 | | |
24 | | explicit EMSA_Raw(size_t expected_hash_size = 0) : |
25 | 0 | m_expected_size(expected_hash_size) {} |
26 | | |
27 | | std::string name() const override; |
28 | | private: |
29 | | void update(const uint8_t[], size_t) override; |
30 | | secure_vector<uint8_t> raw_data() override; |
31 | | |
32 | | secure_vector<uint8_t> encoding_of(const secure_vector<uint8_t>&, size_t, |
33 | | RandomNumberGenerator&) override; |
34 | | |
35 | | bool verify(const secure_vector<uint8_t>&, |
36 | | const secure_vector<uint8_t>&, |
37 | | size_t) override; |
38 | | |
39 | | const size_t m_expected_size; |
40 | | secure_vector<uint8_t> m_message; |
41 | | }; |
42 | | |
43 | | } |
44 | | |
45 | | #endif |