Botan
3.14.1
Crypto and TLS for C&
src
lib
pk_pad
sig_padding
emsa_raw
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
14
namespace
Botan
{
15
16
class
PK_Signature_Options_Reader
;
17
class
RandomNumberGenerator
;
18
19
/**
20
* This class sign inputs directly with no intermediate hashing or padding.
21
*
22
* This is insecure unless used very carefully.
23
*/
24
class
SignRawBytes
final :
public
SignaturePaddingScheme
{
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
Botan::PK_Signature_Options_Reader
Definition
pk_options_readers.h:38
Botan::RandomNumberGenerator
Definition
rng.h:39
Botan::SignRawBytes::hash_function
std::string hash_function() const override
Definition
raw_sig_padding.h:28
Botan::SignRawBytes::SignRawBytes
SignRawBytes(const PK_Signature_Options_Reader &options)
Definition
raw_sig_padding.cpp:19
Botan::SignRawBytes::name
std::string name() const override
Definition
raw_sig_padding.cpp:32
Botan::SignaturePaddingScheme
Definition
sig_padding.h:26
Botan::SignaturePaddingScheme::raw_data
virtual std::vector< uint8_t > raw_data()=0
Botan
Definition
alg_id.cpp:14
Generated by
1.16.1