Botan  2.1.0
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::EMSA_X931 Class Referencefinal

#include <emsa_x931.h>

Inheritance diagram for Botan::EMSA_X931:
Botan::EMSA

Public Member Functions

EMSAclone () override
 
 EMSA_X931 (HashFunction *hash)
 

Detailed Description

EMSA from X9.31 (EMSA2 in IEEE 1363) Useful for Rabin-Williams, also sometimes used with RSA in odd protocols.

Definition at line 21 of file emsa_x931.h.

Constructor & Destructor Documentation

Botan::EMSA_X931::EMSA_X931 ( HashFunction hash)
explicit
Parameters
hashthe hash function to use

Definition at line 86 of file emsa_x931.cpp.

References Botan::ieee1363_hash_id(), and Botan::HashFunction::name().

86  : m_hash(hash)
87  {
88  m_empty_hash = m_hash->final();
89 
90  m_hash_id = ieee1363_hash_id(hash->name());
91 
92  if(!m_hash_id)
93  throw Encoding_Error("EMSA_X931 no hash identifier for " + hash->name());
94  }
uint8_t ieee1363_hash_id(const std::string &name)
Definition: hash_id.cpp:104
MechanismType hash

Member Function Documentation

EMSA* Botan::EMSA_X931::clone ( )
inlineoverridevirtual
Returns
a new object representing the same encoding method as *this

Implements Botan::EMSA.

Definition at line 29 of file emsa_x931.h.

References m_hash.

29 { return new EMSA_X931(m_hash->clone()); }
EMSA_X931(HashFunction *hash)
Definition: emsa_x931.cpp:86

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