Botan 2.19.5 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/emsa.h>
12
13 BOTAN_FUTURE_INTERNAL_HEADER(emsa_raw.h)
14
15namespace Botan {
16
17/**
18* EMSA-Raw - sign inputs directly
19* Don't use this unless you know what you are doing.
20*/
21 class BOTAN_PUBLIC_API(2,0) EMSA_Raw final : public EMSA
22 {
23 public:
24 EMSA* clone() override { return new EMSA_Raw(); }
25
26 explicit EMSA_Raw(size_t expected_hash_size = 0) :
27 m_expected_size(expected_hash_size) {}
28
29 std::string name() const override;
30 private:
31 void update(const uint8_t[], size_t) override;
32 secure_vector<uint8_t> raw_data() override;
33
34 secure_vector<uint8_t> encoding_of(const secure_vector<uint8_t>&, size_t,
35 RandomNumberGenerator&) override;
36
37 bool verify(const secure_vector<uint8_t>&,
38 const secure_vector<uint8_t>&,
39 size_t) override;
40
41 const size_t m_expected_size;
42 secure_vector<uint8_t> m_message;
43 };
44
45}
46
47#endif
Botan::EMSA_Raw
Definition: emsa_raw.h:22
Botan::EMSA_Raw::EMSA_Raw
EMSA_Raw(size_t expected_hash_size=0)
Definition: emsa_raw.h:26
Botan::EMSA_Raw::clone
EMSA * clone() override
Definition: emsa_raw.h:24
Botan::EMSA
Definition: emsa.h:28
Botan::EMSA::encoding_of
virtual secure_vector< uint8_t > encoding_of(const secure_vector< uint8_t > &msg, size_t output_bits, RandomNumberGenerator &rng)=0
Botan::EMSA::verify
virtual bool verify(const secure_vector< uint8_t > &coded, const secure_vector< uint8_t > &raw, size_t key_bits)=0
Botan::EMSA::raw_data
virtual secure_vector< uint8_t > raw_data()=0
Botan::EMSA::name
virtual std::string name() const =0
Botan::EMSA::update
virtual void update(const uint8_t input[], size_t length)=0
Botan::RandomNumberGenerator
Definition: rng.h:26
final
int(* final)(unsigned char *, CTX *)
Definition: commoncrypto_hash.cpp:29
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
BOTAN_FUTURE_INTERNAL_HEADER
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition: compiler.h:136
Botan
Definition: alg_id.cpp:13
Botan::secure_vector
std::vector< T, secure_allocator< T > > secure_vector
Definition: secmem.h:65