Botan 1.10.17
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

◆ EMSA2()

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

Definition at line 98 of file emsa2.cpp.

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
Encoding_Error(const std::string &name)
Definition exceptn.h:131

References Botan::Encoding_Error::Encoding_Error(), and Botan::ieee1363_hash_id().

Referenced by Botan::get_emsa().

◆ ~EMSA2()

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: