Botan 3.6.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(const std::vector<uint8_t>&, size_t, RandomNumberGenerator&) override;
32
33 bool verify(const std::vector<uint8_t>&, const std::vector<uint8_t>&, size_t) override;
34
35 const size_t m_expected_size;
36 std::vector<uint8_t> m_message;
37};
38
39} // namespace Botan
40
41#endif
std::string hash_function() const override
Definition emsa_raw.h:23
std::string name() const override
Definition emsa_raw.cpp:16
EMSA_Raw(size_t expected_hash_size=0)
Definition emsa_raw.h:21
int(* update)(CTX *, const void *, CC_LONG len)
int(* final)(unsigned char *, CTX *)