Botan 3.14.1
Crypto and TLS for C&
raw_sig_padding.h
Go to the documentation of this file.
1/*
2* (C) 1999-2007 Jack Lloyd
3*
4* Botan is released under the Simplified BSD License (see license.txt)
5*/
6
7#ifndef BOTAN_SIGN_RAW_BYTES_H_
8#define BOTAN_SIGN_RAW_BYTES_H_
9
10#include <botan/internal/sig_padding.h>
11#include <string>
12#include <vector>
13
14namespace Botan {
15
18
19/**
20* This class sign inputs directly with no intermediate hashing or padding.
21*
22* This is insecure unless used very carefully.
23*/
25 public:
26 explicit SignRawBytes(const PK_Signature_Options_Reader& options);
27
28 std::string hash_function() const override { return "Raw"; }
29
30 std::string name() const override;
31
32 private:
33 void update(const uint8_t input[], size_t length) override;
34 std::vector<uint8_t> raw_data() override;
35
36 std::vector<uint8_t> encoding_of(std::span<const uint8_t> raw,
37 size_t key_bits,
38 RandomNumberGenerator& rng) override;
39
40 bool verify(std::span<const uint8_t> coded, std::span<const uint8_t> raw, size_t key_bits) override;
41
42 const size_t m_expected_size;
43 std::vector<uint8_t> m_message;
44};
45
46} // namespace Botan
47
48#endif
std::string hash_function() const override
SignRawBytes(const PK_Signature_Options_Reader &options)
std::string name() const override
virtual std::vector< uint8_t > raw_data()=0