Botan  2.7.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 61 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 203 of file pssr.cpp.

203  :
204  m_hash(h), m_SALT_SIZE(m_hash->output_length())
205  {
206  }

◆ 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 208 of file pssr.cpp.

208  :
209  m_hash(h), m_SALT_SIZE(salt_size)
210  {
211  }
size_t salt_size

Member Function Documentation

◆ clone()

EMSA* Botan::PSSR_Raw::clone ( )
inlineoverridevirtual
Returns
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:203

◆ 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 253 of file pssr.cpp.

References Botan::ASN1::to_string().

254  {
255  return "PSSR_Raw(" + m_hash->name() + ",MGF1," + std::to_string(m_SALT_SIZE) + ")";
256  }
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:210

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