| Botan
    1.10.16
    | 
#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_Management::global_state(), and Botan::Algorithm_Factory::Engine_Iterator::next().
| 
 | inline | 
| 
 | inline | 
Set the output format of the signature.
| format | the signature format to use | 
Definition at line 177 of file pubkey.h.
References Botan::ENABLE_FAULT_PROTECTION, and Botan::IEEE_1363.
| 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.
| 
 | inline | 
Sign a message.
| in | the message to sign | 
| rng | the rng to use | 
Definition at line 142 of file pubkey.h.
References 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::PK_Ops::Encryption::max_input_bits().
Referenced by Botan::CMS_Encoder::sign().
| 
 | 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::CMS_Encoder::sign(), 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.
References Botan::same_mem(), and Botan::MemoryRegion< T >::size().
| 
 | inline | 
Add a message part.
| in | the message part to add | 
Definition at line 163 of file pubkey.h.
References Botan::MemoryRegion< T >::size(), and update().
Referenced by update().
 1.8.13
 1.8.13