Botan 1.10.17
emsa4.h
Go to the documentation of this file.
1/*
2* EMSA4
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_EMSA4_H__
9#define BOTAN_EMSA4_H__
10
11#include <botan/emsa.h>
12#include <botan/hash.h>
13#include <botan/kdf.h>
14
15namespace Botan {
16
17/**
18* EMSA4 aka PSS-R
19*/
20class BOTAN_DLL EMSA4 : public EMSA
21 {
22 public:
23 /**
24 * @param hash the hash object to use
25 */
26 EMSA4(HashFunction* hash);
27
28 /**
29 * @param hash the hash object to use
30 * @param salt_size the size of the salt to use in bytes
31 */
32 EMSA4(HashFunction* hash, size_t salt_size);
33
34 ~EMSA4() { delete hash; delete mgf; }
35 private:
36 void update(const byte[], size_t);
37 SecureVector<byte> raw_data();
38
39 SecureVector<byte> encoding_of(const MemoryRegion<byte>&, size_t,
41 bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
42 size_t);
43
44 size_t SALT_SIZE;
45 HashFunction* hash;
46 const MGF* mgf;
47 };
48
49}
50
51#endif
EMSA4(HashFunction *hash)
Definition emsa4.cpp:130