Botan  2.8.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:
Botan::EMSA

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 62 of file pssr.h.

Constructor & Destructor Documentation

◆ PSSR_Raw() [1/2]

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

Definition at line 224 of file pssr.cpp.

Referenced by clone().

224  :
225  m_hash(h),
226  m_salt_size(m_hash->output_length()),
227  m_required_salt_len(false)
228  {
229  }

◆ PSSR_Raw() [2/2]

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

Definition at line 231 of file pssr.cpp.

231  :
232  m_hash(h),
233  m_salt_size(salt_size),
234  m_required_salt_len(true)
235  {
236  }
size_t salt_size

Member Function Documentation

◆ clone()

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

Implements Botan::EMSA.

Definition at line 284 of file pssr.cpp.

References PSSR_Raw().

285  {
286  return new PSSR_Raw(m_hash->clone(), m_salt_size);
287  }
PSSR_Raw(HashFunction *hash)
Definition: pssr.cpp:224

◆ config_for_x509()

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

Prepare sig_algo for use in choose_sig_format for x509 certs

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

◆ name()

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

Implements Botan::EMSA.

Definition at line 289 of file pssr.cpp.

References Botan::ASN1::to_string().

290  {
291  return "PSSR_Raw(" + m_hash->name() + ",MGF1," + std::to_string(m_salt_size) + ")";
292  }
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:210

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