|
Botan 1.10.17
|
#include <pubkey.h>
Public Member Functions | |
| PK_Signer (const Private_Key &key, const std::string &emsa, Signature_Format format=IEEE_1363, Fault_Protection prot=ENABLE_FAULT_PROTECTION) | |
| void | set_output_format (Signature_Format format) |
| SecureVector< byte > | sign_message (const byte in[], size_t length, RandomNumberGenerator &rng) |
| SecureVector< byte > | sign_message (const MemoryRegion< byte > &in, RandomNumberGenerator &rng) |
| SecureVector< byte > | signature (RandomNumberGenerator &rng) |
| void | update (byte in) |
| void | update (const byte in[], size_t length) |
| void | update (const MemoryRegion< 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 128 of file pubkey.cpp.
References Botan::Public_Key::algo_name(), Botan::DISABLE_FAULT_PROTECTION, Botan::ENABLE_FAULT_PROTECTION, Botan::get_emsa(), Botan::global_state(), Botan::Lookup_Error::Lookup_Error(), and Botan::Algorithm_Factory::Engine_Iterator::next().
Referenced by Botan::choose_sig_format(), and Botan::get_pk_signer().
|
inline |
|
inline |
| SecureVector< 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 160 of file pubkey.cpp.
References signature(), and update().
Referenced by Botan::Certificate_Verify::Certificate_Verify(), Botan::EAC1_1_ADO::make_signed(), Botan::EAC1_1_gen_CVC< Derived >::make_signed(), Botan::X509_Object::make_signed(), sign_message(), and Botan::KeyPair::signature_consistency_check().
|
inline |
Sign a message.
| in | the message to sign |
| rng | the rng to use |
Definition at line 142 of file pubkey.h.
References sign_message(), and Botan::MemoryRegion< T >::size().
| SecureVector< 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 210 of file pubkey.cpp.
References BOTAN_ASSERT, Botan::DER_SEQUENCE, Botan::DER_Encoder::encode_list(), Botan::Encoding_Error::Encoding_Error(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents(), Botan::IEEE_1363, Botan::SEQUENCE, Botan::MemoryRegion< T >::size(), Botan::DER_Encoder::start_cons(), and Botan::to_string().
Referenced by Botan::Server_Key_Exchange::Server_Key_Exchange(), Botan::CMS_Encoder::sign(), and sign_message().
|
inline |
Add a message part (single byte).
| in | the byte to add |
Definition at line 150 of file pubkey.h.
References update().
Referenced by Botan::Server_Key_Exchange::Server_Key_Exchange(), Botan::CMS_Encoder::sign(), sign_message(), and update().
| 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 170 of file pubkey.cpp.
|
inline |