Botan 2.13.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::ISO_9796_DS2 Class Referencefinal

`#include <iso9796.h>`

Inheritance diagram for Botan::ISO_9796_DS2:

## Public Member Functions
EMSA * | clone () override
virtual AlgorithmIdentifier | config_for_x509 (const Private_Key &key, const std::string &cert_hash_name) const
| ISO_9796_DS2 (HashFunction *hash, bool implicit=false)
| ISO_9796_DS2 (HashFunction *hash, bool implicit, size_t salt_size)
std::string | name () const override

## Detailed Description

ISO-9796-2 - Digital signature scheme 2 (probabilistic)

Definition at line 21 of file iso9796.h.

## Constructor & Destructor Documentation

Botan::ISO_9796_DS2::ISO_9796_DS2 | ( | HashFunction * | hash,
|  | bool | implicit = `false`
| ) |  |
| inline explicit

Parameters

  hash | function to use
  implicit | whether or not the trailer is implicit

Definition at line 28 of file iso9796.h.

Referenced by clone().

28 : m_hash(hash), m_implicit(implicit),
29 m_SALT_SIZE(hash->output_length()) {}
hash
MechanismType hash
Definition: p11_mechanism.cpp:64

Botan::ISO_9796_DS2::ISO_9796_DS2 | ( | HashFunction * | hash,
|  | bool | implicit,
|  | size_t | salt_size
| ) |  |
| inline

Parameters

  hash | function to use
  implicit | whether or not the trailer is implicit
  salt_size | size of the salt to use in bytes

Definition at line 36 of file iso9796.h.

36 : m_hash(hash), m_implicit(implicit),
37 m_SALT_SIZE(salt_size) {}
salt_size
size_t salt_size
Definition: p11_mechanism.cpp:70
hash
MechanismType hash
Definition: p11_mechanism.cpp:64

## Member Function Documentation

EMSA * Botan::ISO_9796_DS2::clone | ( |  | ) |
| override virtual

Returns
  a new object representing the same encoding method as *this

Implements Botan::EMSA.

Definition at line 219 of file iso9796.cpp.

References ISO_9796_DS2().

220 {
221 return new ISO_9796_DS2(m_hash->clone(), m_implicit, m_SALT_SIZE);
222 }
Botan::ISO_9796_DS2::ISO_9796_DS2
ISO_9796_DS2(HashFunction *hash, bool implicit=false)
Definition: iso9796.h:28

AlgorithmIdentifier Botan::EMSA::config_for_x509 | ( | const Private_Key & | key,
|  | const std::string & | cert_hash_name
| ) |  | const
| virtual inherited

Prepare sig_algo for use in choose_sig_format for x509 certs

Parameters

  key | used for checking compatibility with the encoding scheme
  cert_hash_name | is checked to equal the hash for the encoding

Returns
  algorithm identifier to signatures created using this key, padding method and hash.

Reimplemented in Botan::EMSA_PKCS1v15, Botan::PSSR, and Botan::EMSA1.

Definition at line 38 of file emsa.cpp.

References Botan::EMSA::name().

40 {
41 throw Not_Implemented("Encoding " + name() + " not supported for signing X509 objects");
42 }
Botan::EMSA::name
virtual std::string name() const =0

std::string Botan::ISO_9796_DS2::name | ( |  | ) | const
| override virtual

Returns
  the SCAN name of the encoding/padding scheme

Implements Botan::EMSA.

Definition at line 266 of file iso9796.cpp.

References Botan::ASN1::to_string().

267 {
268 return "ISO_9796_DS2(" + m_hash->name() + ","
269 + (m_implicit ? "imp" : "exp") + "," + std::to_string(m_SALT_SIZE) + ")";
270 }
Botan::ASN1::to_string
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:213

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

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