Botan 1.10.17
emsa2.h
Go to the documentation of this file.
1/*
2* EMSA2
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_EMSA2_H__
9#define BOTAN_EMSA2_H__
10
11#include <botan/emsa.h>
12#include <botan/hash.h>
13
14namespace Botan {
15
16/**
17* EMSA2 from IEEE 1363
18* Useful for Rabin-Williams
19*/
20class BOTAN_DLL EMSA2 : public EMSA
21 {
22 public:
23 /**
24 * @param hash the hash object to use
25 */
26 EMSA2(HashFunction* hash);
27 ~EMSA2() { delete hash; }
28 private:
29 void update(const byte[], size_t);
30 SecureVector<byte> raw_data();
31
32 SecureVector<byte> encoding_of(const MemoryRegion<byte>&, size_t,
34
35 bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
36 size_t);
37
38 SecureVector<byte> empty_hash;
39 HashFunction* hash;
40 byte hash_id;
41 };
42
43}
44
45#endif
EMSA2(HashFunction *hash)
Definition emsa2.cpp:98