Botan 3.8.1
Crypto and TLS for C&
emsa_raw.h
Go to the documentation of this file.
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
13namespace Botan {
14
15/**
16* EMSA-Raw - sign inputs directly
17* Don't use this unless you know what you are doing.
18*/
19class EMSA_Raw final : public EMSA {
20 public:
21 explicit EMSA_Raw(size_t expected_hash_size = 0) : m_expected_size(expected_hash_size) {}
22
23 std::string hash_function() const override { return "Raw"; }
24
25 std::string name() const override;
26
27 private:
28 void update(const uint8_t[], size_t) override;
29 std::vector<uint8_t> raw_data() override;
30
31 std::vector<uint8_t> encoding_of(std::span<const uint8_t> raw,
32 size_t key_bits,
33 RandomNumberGenerator& rng) override;
34
35 bool verify(std::span<const uint8_t> coded, std::span<const uint8_t> raw, size_t key_bits) override;
36
37 const size_t m_expected_size;
38 std::vector<uint8_t> m_message;
39};
40
41} // namespace Botan
42
43#endif
std::string hash_function() const override
Definition emsa_raw.h:23
std::string name() const override
Definition emsa_raw.cpp:17
EMSA_Raw(size_t expected_hash_size=0)
Definition emsa_raw.h:21