|
Botan
1.11.4
|
#include <pubkey.h>
Public Member Functions | |
| PK_Signer & | operator= (const PK_Signer &)=delete |
| PK_Signer (const Private_Key &key, const std::string &emsa, Signature_Format format=IEEE_1363, Fault_Protection prot=ENABLE_FAULT_PROTECTION) | |
| PK_Signer (const PK_Signer &)=delete | |
| void | set_output_format (Signature_Format format) |
| std::vector< byte > | sign_message (const byte in[], size_t length, RandomNumberGenerator &rng) |
| std::vector< byte > | sign_message (const std::vector< byte > &in, RandomNumberGenerator &rng) |
| std::vector< byte > | sign_message (const secure_vector< byte > &in, RandomNumberGenerator &rng) |
| std::vector< byte > | signature (RandomNumberGenerator &rng) |
| void | update (byte in) |
| void | update (const byte in[], size_t length) |
| void | update (const std::vector< byte > &in) |
| ~PK_Signer () | |
Public Key Signer. Use the sign_message() functions for small messages. Use multiple calls update() to process large messages and generate the signature by finally calling signature().
| Botan::PK_Signer::PK_Signer | ( | const Private_Key & | key, |
| const std::string & | emsa, | ||
| Signature_Format | format = IEEE_1363, |
||
| Fault_Protection | prot = ENABLE_FAULT_PROTECTION |
||
| ) |
Construct a PK Signer.
| key | the key to use inside this signer |
| emsa | the EMSA to use An example would be "EMSA1(SHA-224)". |
| format | the signature format to use |
| prot | says if fault protection should be enabled |
Definition at line 125 of file pubkey.cpp.
References Botan::Public_Key::algo_name(), Botan::DISABLE_FAULT_PROTECTION, Botan::ENABLE_FAULT_PROTECTION, Botan::get_emsa(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::Engine_Iterator::next().
|
delete |
|
inline |
|
inline |
| std::vector< byte > Botan::PK_Signer::sign_message | ( | const byte | in[], |
| size_t | length, | ||
| RandomNumberGenerator & | rng | ||
| ) |
Sign a message.
| in | the message to sign as a byte array |
| length | the length of the above byte array |
| rng | the rng to use |
Definition at line 158 of file pubkey.cpp.
References signature(), and update().
Referenced by Botan::TLS::Certificate_Verify::Certificate_Verify(), Botan::EAC1_1_ADO::make_signed(), Botan::X509_Object::make_signed(), Botan::EAC1_1_gen_CVC< Derived >::make_signed(), and Botan::KeyPair::signature_consistency_check().
|
inline |
Sign a message.
| in | the message to sign |
| rng | the rng to use |
Definition at line 147 of file pubkey.h.
References rng, and sign_message().
Referenced by sign_message().
|
inline |
Definition at line 151 of file pubkey.h.
References rng, and sign_message().
Referenced by sign_message().
| std::vector< byte > Botan::PK_Signer::signature | ( | RandomNumberGenerator & | rng | ) |
Get the signature of the so far processed message (provided by the calls to update()).
| rng | the rng to use |
Definition at line 208 of file pubkey.cpp.
References BOTAN_ASSERT, Botan::DER_SEQUENCE, Botan::DER_Encoder::encode_list(), Botan::EMSA::encoding_of(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents_unlocked(), Botan::IEEE_1363, Botan::PK_Ops::Signature::max_input_bits(), Botan::PK_Ops::Signature::message_parts(), Botan::EMSA::raw_data(), rng, Botan::SEQUENCE, Botan::PK_Ops::Signature::sign(), Botan::DER_Encoder::start_cons(), Botan::ASN1::to_string(), and Botan::unlock().
Referenced by Botan::PK_Signer_Filter::end_msg(), Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), and sign_message().
|
inline |
Add a message part (single byte).
| in | the byte to add |
Definition at line 159 of file pubkey.h.
References update().
Referenced by Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), sign_message(), update(), and Botan::PK_Signer_Filter::write().
| void Botan::PK_Signer::update | ( | const byte | in[], |
| size_t | length | ||
| ) |
Add a message part.
| in | the message part to add as a byte array |
| length | the length of the above byte array |
Definition at line 168 of file pubkey.cpp.
References Botan::EMSA::update().
|
inline |
1.8.3.1