Botan: Botan::EMSA2 Class Reference

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

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

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

`#include <emsa2.h>`

Inheritance diagram for Botan::EMSA2:

## 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

  hash | the 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 }
Botan::ieee1363_hash_id
byte ieee1363_hash_id(const std::string &name)
Definition: hash_id.cpp:93
Botan::Algorithm::name
virtual std::string name() const =0
Botan::Buffered_Computation::final
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:

- src/pk_pad/emsa2/emsa2.h
- src/pk_pad/emsa2/emsa2.cpp