Botan  1.10.12
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,
39 
40  bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
41  size_t);
42 
43  HashFunction* hash;
44  };
45 
46 }
47 
48 #endif
~EMSA1()
Definition: emsa1.h:27
const HashFunction * hash_ptr() const
Definition: emsa1.h:32
unsigned char byte
Definition: types.h:22
macro_name HP_ACC binary_name aCC compile_option c output_to_option o add_include_dir_option I add_lib_dir_option L add_lib_option l lib_opt_flags O2 check_opt_flags O2 debug_flags g no_debug_flags lang_flags AA ext eh z warning_flags shared_flags Z makefile_style unix< mach_abi_linking > hppa1 DAportable hppa1 DA1 hppa2 DA2</mach_abi_linking >< so_link_flags > h
Definition: hpcc.txt:28
EMSA1(HashFunction *h)
Definition: emsa1.h:26