Botan
1.10.17
src
pk_pad
emsa1
emsa1.h
Go to the documentation of this file.
1
/*
2
* EMSA1
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Distributed under the terms of the Botan license
6
*/
7
8
#ifndef BOTAN_EMSA1_H__
9
#define BOTAN_EMSA1_H__
10
11
#include <botan/emsa.h>
12
#include <botan/hash.h>
13
14
namespace
Botan
{
15
16
/**
17
* EMSA1 from IEEE 1363
18
* Essentially, sign the hash directly
19
*/
20
class
BOTAN_DLL
EMSA1
:
public
EMSA
21
{
22
public
:
23
/**
24
* @param h the hash object to use
25
*/
26
EMSA1
(
HashFunction
* h) : hash(h) {}
27
~EMSA1
() {
delete
hash; }
28
protected
:
29
/**
30
* @return const pointer to the underlying hash
31
*/
32
const
HashFunction
*
hash_ptr
()
const
{
return
hash; }
33
private
:
34
void
update(
const
byte
[],
size_t
);
35
SecureVector<byte>
raw_data();
36
37
SecureVector<byte>
encoding_of(
const
MemoryRegion<byte>
&,
size_t
,
38
RandomNumberGenerator
& rng);
39
40
bool
verify(
const
MemoryRegion<byte>
&,
const
MemoryRegion<byte>
&,
41
size_t
);
42
43
HashFunction
* hash;
44
};
45
46
}
47
48
#endif
Botan::EMSA1::~EMSA1
~EMSA1()
Definition
emsa1.h:27
Botan::EMSA1::hash_ptr
const HashFunction * hash_ptr() const
Definition
emsa1.h:32
Botan::EMSA1::EMSA1
EMSA1(HashFunction *h)
Definition
emsa1.h:26
Botan::EMSA
Definition
emsa.h:20
Botan::HashFunction
Definition
hash.h:22
Botan::MemoryRegion
Definition
secmem.h:22
Botan::RandomNumberGenerator
Definition
rng.h:21
Botan::SecureVector
Definition
secmem.h:329
Botan
Definition
algo_base.h:14
Generated by
1.18.0