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

#include <pssr.h>

Inheritance diagram for Botan::PSSR_Raw:

Public Member Functions

EMSAclone () override
virtual AlgorithmIdentifier config_for_x509 (const Private_Key &key, const std::string &cert_hash_name) const
std::string name () const override
 PSSR_Raw (HashFunction *hash)
 PSSR_Raw (HashFunction *hash, size_t salt_size)

Detailed Description

PSSR_Raw This accepts a pre-hashed buffer

Definition at line 61 of file pssr.h.

Constructor & Destructor Documentation

◆ PSSR_Raw() [1/2]

Botan::PSSR_Raw::PSSR_Raw ( HashFunction hash)
hashthe hash function to use

Definition at line 211 of file pssr.cpp.

211  :
212  m_hash(h), m_SALT_SIZE(m_hash->output_length())
213  {
214  }

◆ PSSR_Raw() [2/2]

Botan::PSSR_Raw::PSSR_Raw ( HashFunction hash,
size_t  salt_size 
hashthe hash function to use
salt_sizethe size of the salt to use in bytes

Definition at line 216 of file pssr.cpp.

216  :
217  m_hash(h), m_SALT_SIZE(salt_size)
218  {
219  }
size_t salt_size

Member Function Documentation

◆ clone()

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

Implements Botan::EMSA.

Definition at line 76 of file pssr.h.

76 { return new PSSR_Raw(m_hash->clone(), m_SALT_SIZE); }
PSSR_Raw(HashFunction *hash)
Definition: pssr.cpp:211

◆ config_for_x509()

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

Prepare sig_algo for use in choose_sig_format for x509 certs

keyused for checking compatibility with the encoding scheme
cert_hash_nameis checked to equal the hash for the encoding
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  }
virtual std::string name() const =0

◆ name()

std::string Botan::PSSR_Raw::name ( ) const
the SCAN name of the encoding/padding scheme

Implements Botan::EMSA.

Definition at line 261 of file pssr.cpp.

References Botan::ASN1::to_string().

262  {
263  return "PSSR_Raw(" + m_hash->name() + ",MGF1," + std::to_string(m_SALT_SIZE) + ")";
264  }
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:145

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