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

#include <emsa_raw.h>

Inheritance diagram for Botan::EMSA_Raw:
Botan::EMSA

Public Member Functions

EMSAclone () override
 
virtual AlgorithmIdentifier config_for_x509 (const Private_Key &key, const std::string &cert_hash_name) const
 
 EMSA_Raw (size_t expected_hash_size=0)
 
std::string name () const override
 

Detailed Description

EMSA-Raw - sign inputs directly Don't use this unless you know what you are doing.

Definition at line 19 of file emsa_raw.h.

Constructor & Destructor Documentation

◆ EMSA_Raw()

Botan::EMSA_Raw::EMSA_Raw ( size_t  expected_hash_size = 0)
inlineexplicit

Definition at line 24 of file emsa_raw.h.

24  :
25  m_expected_size(expected_hash_size) {}

Member Function Documentation

◆ clone()

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

Implements Botan::EMSA.

Definition at line 22 of file emsa_raw.h.

22 { return new EMSA_Raw(); }
EMSA_Raw(size_t expected_hash_size=0)
Definition: emsa_raw.h:24

◆ 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::EMSA_Raw::name ( ) const
overridevirtual
Returns
the SCAN name of the encoding/padding scheme

Implements Botan::EMSA.

Definition at line 13 of file emsa_raw.cpp.

References Botan::ASN1::to_string().

14  {
15  if(m_expected_size > 0)
16  return "Raw(" + std::to_string(m_expected_size) + ")";
17  return "Raw";
18  }
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:145

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