Botan  1.10.9
Public Member Functions | List of all members
Botan::EMSA2 Class Reference

#include <emsa2.h>

Inheritance diagram for Botan::EMSA2:
Botan::EMSA

Public Member Functions

 EMSA2 (HashFunction *hash)
 
 ~EMSA2 ()
 

Detailed Description

EMSA2 from IEEE 1363 Useful for Rabin-Williams

Definition at line 20 of file emsa2.h.

Constructor & Destructor Documentation

Botan::EMSA2::EMSA2 ( HashFunction hash)
Parameters
hashthe hash object to use

Definition at line 98 of file emsa2.cpp.

References Botan::Buffered_Computation::final(), Botan::ieee1363_hash_id(), and Botan::Algorithm::name().

98  : hash(hash_in)
99  {
100  empty_hash = hash->final();
101 
102  const std::string hash_name = hash->name();
103  hash_id = ieee1363_hash_id(hash_name);
104 
105  if(hash_id == 0)
106  {
107  delete hash;
108  throw Encoding_Error("EMSA2 cannot be used with " + hash_name);
109  }
110  }
byte ieee1363_hash_id(const std::string &name)
Definition: hash_id.cpp:93
virtual std::string name() const =0
void final(byte out[])
Definition: buf_comp.h:80
Botan::EMSA2::~EMSA2 ( )
inline

Definition at line 27 of file emsa2.h.

27 { delete hash; }

The documentation for this class was generated from the following files: