|
Botan 3.13.0
Crypto and TLS for C&
|
#include <symkey.h>
Public Member Functions | |
| const uint8_t * | begin () const |
| secure_vector< uint8_t > | bits_of () const |
| bool | empty () const |
| const uint8_t * | end () const |
| size_t | length () const |
| OctetString (const uint8_t in[], size_t len) | |
| OctetString (RandomNumberGenerator &rng, size_t len) | |
| OctetString (secure_vector< uint8_t > in) | |
| OctetString (std::span< const uint8_t > in) | |
| OctetString (std::string_view str="") | |
| OctetString & | operator^= (const OctetString &other) |
| void | set_odd_parity () |
| size_t | size () const |
| std::string | to_string () const |
|
explicit |
Create a new OctetString
| str | is a hex encoded string |
Definition at line 27 of file symkey.cpp.
References Botan::hex_decode().
Referenced by OctetString(), and operator^=().
| Botan::OctetString::OctetString | ( | RandomNumberGenerator & | rng, |
| size_t | len ) |
Create a new random OctetString
| Random Number Generators | is a random number generator |
| len | is the desired length in bytes |
Definition at line 20 of file symkey.cpp.
References Botan::RandomNumberGenerator::random_vec().
| Botan::OctetString::OctetString | ( | const uint8_t | in[], |
| size_t | len ) |
Create a new OctetString
| in | is an array |
| len | is the length of in in bytes |
Definition at line 37 of file symkey.cpp.
|
inlineexplicit |
Create a new OctetString
| in | a bytestring |
Definition at line 106 of file symkey.h.
References begin(), end(), and OctetString().
|
inlineexplicit |
Create a new OctetString
| in | a bytestring |
Definition at line 112 of file symkey.h.
|
inline |
Return a pointer to the first byte
Definition at line 52 of file symkey.h.
Referenced by Botan::ECIES_KA_Operation::derive_secret(), end(), OctetString(), Botan::operator^(), operator^=(), and Botan::SymmetricAlgorithm::set_key().
|
inline |
Return the contents of this octet string
Definition at line 46 of file symkey.h.
Referenced by Botan::check_passhash9(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::generate_passhash9(), Botan::operator+(), Botan::operator==(), Botan::Cipher_Mode_Filter::set_iv(), and Botan::TLS::Callbacks::tls_ephemeral_key_agreement().
|
inline |
Test whether this octet string is empty
Definition at line 40 of file symkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::get_cipher(), and Botan::Keyed_Filter::set_iv().
|
inline |
Return a pointer one past the last byte
Definition at line 58 of file symkey.h.
References begin().
Referenced by Botan::ECIES_KA_Operation::derive_secret(), and OctetString().
|
inline |
Return the length of this octet string
Definition at line 28 of file symkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::operator^(), operator^=(), Botan::Keyed_Filter::set_iv(), and Botan::SymmetricAlgorithm::set_key().
| OctetString & Botan::OctetString::operator^= | ( | const OctetString & | other | ) |
XOR the contents of another octet string into this one
| other | octet string |
Definition at line 73 of file symkey.cpp.
References begin(), length(), OctetString(), Botan::xor_buf(), and Botan::zeroise().
| void Botan::OctetString::set_odd_parity | ( | ) |
Force to have odd parity
Deprecated. There is no reason to use this outside of interacting with some very old or weird system which requires DES and also which do not automatically ignore the parity bits.
Definition at line 57 of file symkey.cpp.
|
inline |
Return the length of this octet string
Definition at line 34 of file symkey.h.
Referenced by Botan::rfc3394_keyunwrap(), and Botan::rfc3394_keywrap().
| std::string Botan::OctetString::to_string | ( | ) | const |
Format this octet string as a hex string
Definition at line 66 of file symkey.cpp.
References Botan::hex_encode().