Botan 1.10.17
emsa3.h
Go to the documentation of this file.
1/*
2* EMSA3 and EMSA3_Raw
3* (C) 1999-2008 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_EMSA3_H__
9#define BOTAN_EMSA3_H__
10
11#include <botan/emsa.h>
12#include <botan/hash.h>
13
14namespace Botan {
15
16/**
17* EMSA3 from IEEE 1363
18* aka PKCS #1 v1.5 signature padding
19* aka PKCS #1 block type 1
20*/
21class BOTAN_DLL EMSA3 : public EMSA
22 {
23 public:
24 /**
25 * @param hash the hash object to use
26 */
27 EMSA3(HashFunction* hash);
28 ~EMSA3();
29
30 void update(const byte[], size_t);
31
33
36
38 size_t);
39 private:
40 HashFunction* hash;
41 SecureVector<byte> hash_id;
42 };
43
44/**
45* EMSA3_Raw which is EMSA3 without a hash or digest id (which
46* according to QCA docs is "identical to PKCS#11's CKM_RSA_PKCS
47* mechanism", something I have not confirmed)
48*/
49class BOTAN_DLL EMSA3_Raw : public EMSA
50 {
51 public:
52 void update(const byte[], size_t);
53
55
58
60 size_t);
61
62 private:
63 SecureVector<byte> message;
64 };
65
66}
67
68#endif
SecureVector< byte > raw_data()
Definition emsa3.cpp:118
bool verify(const MemoryRegion< byte > &, const MemoryRegion< byte > &, size_t)
Definition emsa3.cpp:138
void update(const byte[], size_t)
Definition emsa3.cpp:110
SecureVector< byte > encoding_of(const MemoryRegion< byte > &, size_t, RandomNumberGenerator &rng)
Definition emsa3.cpp:128
EMSA3(HashFunction *hash)
Definition emsa3.cpp:94
SecureVector< byte > raw_data()
Definition emsa3.cpp:51
bool verify(const MemoryRegion< byte > &, const MemoryRegion< byte > &, size_t)
Definition emsa3.cpp:73
void update(const byte[], size_t)
Definition emsa3.cpp:43
SecureVector< byte > encoding_of(const MemoryRegion< byte > &, size_t, RandomNumberGenerator &rng)
Definition emsa3.cpp:59