Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::EMSA_X931 Class Referencefinal

`#include <emsa_x931.h>`

Inheritance diagram for Botan::EMSA_X931:

## Public Member Functions
EMSA * | clone () 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

  hash | the 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 }
Botan::ieee1363_hash_id
uint8_t ieee1363_hash_id(const std::string &name)
Definition: hash_id.cpp:104
hash
MechanismType hash
Definition: p11_mechanism.cpp:63

## Member Function Documentation

EMSA* Botan::EMSA_X931::clone | ( |  | ) |
| inline override virtual

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()); }
Botan::EMSA_X931::EMSA_X931
EMSA_X931(HashFunction *hash)
Definition: emsa_x931.cpp:86

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

- src/lib/pk_pad/emsa_x931/emsa_x931.h
- src/lib/pk_pad/emsa_x931/emsa_x931.cpp