Botan
1.11.15
|
#include <compression.h>
Public Types | |
typedef SCAN_Name | Spec |
Public Member Functions | |
virtual void | clear ()=0 |
size_t | default_nonce_length () const override |
virtual void | finish (secure_vector< byte > &final_block, size_t offset=0)=0 |
virtual void | flush (secure_vector< byte > &buf, size_t offset=0) |
size_t | minimum_final_size () const override |
virtual std::string | name () const =0 |
size_t | output_length (size_t) const override |
virtual std::string | provider () const |
template<typename Alloc > | |
secure_vector< byte > | start (const std::vector< byte, Alloc > &nonce) |
secure_vector< byte > | start (const byte nonce[], size_t nonce_len) |
secure_vector< byte > | start () |
virtual secure_vector< byte > | start_raw (const byte nonce[], size_t nonce_len)=0 |
template<typename Alloc > | |
secure_vector< byte > | start_vec (const std::vector< byte, Alloc > &nonce) |
virtual void | update (secure_vector< byte > &blocks, size_t offset=0)=0 |
size_t | update_granularity () const override |
bool | valid_nonce_length (size_t nonce_len) const override |
Definition at line 15 of file compression.h.
typedef SCAN_Name Botan::Transform::Spec [inherited] |
Definition at line 27 of file transform.h.
virtual void Botan::Transform::clear | ( | ) | [pure virtual, inherited] |
Implemented in Botan::Stream_Decompression, Botan::Stream_Compression, Botan::Stream_Cipher_Mode, Botan::OCB_Mode, Botan::SIV_Mode, Botan::CCM_Mode, Botan::ChaCha20Poly1305_Mode, Botan::GCM_Mode, Botan::EAX_Mode, Botan::CFB_Mode, Botan::XTS_Mode, Botan::CBC_Mode, and Botan::ECB_Mode.
Referenced by botan_cipher_clear().
size_t Botan::Compressor_Transform::default_nonce_length | ( | ) | const [inline, override, virtual] |
Return the default size for a nonce
Implements Botan::Transform.
Definition at line 22 of file compression.h.
{ return 0; }
virtual void Botan::Transform::finish | ( | secure_vector< byte > & | final_block, |
size_t | offset = 0 |
||
) | [pure virtual, inherited] |
Complete processing of a message.
final_block | in/out parameter which must be at least minimum_final_size() bytes, and will be set to any final output |
offset | an offset into final_block to begin processing |
Implemented in Botan::CTS_Decryption, Botan::OCB_Decryption, Botan::CCM_Decryption, Botan::EAX_Decryption, Botan::CBC_Decryption, Botan::GCM_Decryption, Botan::SIV_Decryption, Botan::OCB_Encryption, Botan::CCM_Encryption, Botan::ChaCha20Poly1305_Decryption, Botan::CTS_Encryption, Botan::Stream_Decompression, Botan::CFB_Decryption, Botan::EAX_Encryption, Botan::SIV_Encryption, Botan::ECB_Decryption, Botan::XTS_Decryption, Botan::GCM_Encryption, Botan::CBC_Encryption, Botan::CFB_Encryption, Botan::ChaCha20Poly1305_Encryption, Botan::Stream_Compression, Botan::XTS_Encryption, Botan::ECB_Encryption, and Botan::Stream_Cipher_Mode.
Referenced by botan_cipher_update().
virtual void Botan::Compressor_Transform::flush | ( | secure_vector< byte > & | buf, |
size_t | offset = 0 |
||
) | [inline, virtual] |
Reimplemented in Botan::Stream_Compression.
Definition at line 27 of file compression.h.
{ update(buf, offset); }
size_t Botan::Compressor_Transform::minimum_final_size | ( | ) | const [inline, override, virtual] |
Implements Botan::Transform.
Definition at line 20 of file compression.h.
{ return 0; }
virtual std::string Botan::Transform::name | ( | ) | const [pure virtual, inherited] |
Implemented in Botan::Gzip_Decompression, Botan::Gzip_Compression, Botan::Deflate_Decompression, Botan::Deflate_Compression, Botan::Bzip2_Decompression, Botan::LZMA_Decompression, Botan::Zlib_Decompression, Botan::Stream_Cipher_Mode, Botan::SIV_Mode, Botan::OCB_Mode, Botan::Bzip2_Compression, Botan::LZMA_Compression, Botan::Zlib_Compression, Botan::CCM_Mode, Botan::ChaCha20Poly1305_Mode, Botan::GCM_Mode, Botan::EAX_Mode, Botan::CBC_Mode, Botan::CFB_Mode, Botan::ECB_Mode, and Botan::XTS_Mode.
Referenced by Botan::Compression_Decompression_Filter::Compression_Decompression_Filter(), and Botan::Stream_Decompression::finish().
size_t Botan::Compressor_Transform::output_length | ( | size_t | input_length | ) | const [inline, override, virtual] |
Returns the size of the output if this transform is used to process a message with input_length bytes. Will throw if unable to give a precise answer.
Implements Botan::Transform.
Definition at line 29 of file compression.h.
{ throw std::runtime_error(name() + " output length indeterminate"); }
virtual std::string Botan::Transform::provider | ( | ) | const [inline, virtual, inherited] |
Return some short name describing the provider of this tranformation. Useful in cases where multiple implementations are available (eg, different implementations of AES). Default "core" is used for the 'standard' implementation included in the library.
Definition at line 120 of file transform.h.
{ return "core"; }
secure_vector<byte> Botan::Transform::start | ( | const std::vector< byte, Alloc > & | nonce | ) | [inline, inherited] |
Begin processing a message.
nonce | the per message nonce |
Definition at line 34 of file transform.h.
Referenced by botan_cipher_start().
{ return start(&nonce[0], nonce.size()); }
secure_vector<byte> Botan::Transform::start | ( | const byte | nonce[], |
size_t | nonce_len | ||
) | [inline, inherited] |
Begin processing a message.
nonce | the per message nonce |
nonce_len | length of nonce |
Definition at line 55 of file transform.h.
{ return start_raw(nonce, nonce_len); }
secure_vector<byte> Botan::Transform::start | ( | ) | [inline, inherited] |
Begin processing a message.
Definition at line 63 of file transform.h.
{ return start_raw(nullptr, 0); }
virtual secure_vector<byte> Botan::Transform::start_raw | ( | const byte | nonce[], |
size_t | nonce_len | ||
) | [pure virtual, inherited] |
secure_vector<byte> Botan::Transform::start_vec | ( | const std::vector< byte, Alloc > & | nonce | ) | [inline, inherited] |
Begin processing a message.
nonce | the per message nonce |
Definition at line 45 of file transform.h.
{ return start(&nonce[0], nonce.size()); }
virtual void Botan::Transform::update | ( | secure_vector< byte > & | blocks, |
size_t | offset = 0 |
||
) | [pure virtual, inherited] |
Process some data. Input must be in size update_granularity() byte blocks.
blocks | in/out paramter which will possibly be resized |
offset | an offset into blocks to begin processing |
Implemented in Botan::OCB_Decryption, Botan::EAX_Decryption, Botan::CBC_Decryption, Botan::GCM_Decryption, Botan::OCB_Encryption, Botan::ChaCha20Poly1305_Decryption, Botan::Stream_Decompression, Botan::CFB_Decryption, Botan::EAX_Encryption, Botan::ECB_Decryption, Botan::XTS_Decryption, Botan::GCM_Encryption, Botan::CBC_Encryption, Botan::CFB_Encryption, Botan::ChaCha20Poly1305_Encryption, Botan::Stream_Compression, Botan::XTS_Encryption, Botan::ECB_Encryption, Botan::CCM_Mode, Botan::SIV_Mode, and Botan::Stream_Cipher_Mode.
Referenced by botan_cipher_update().
size_t Botan::Compressor_Transform::update_granularity | ( | ) | const [inline, override, virtual] |
Implements Botan::Transform.
Definition at line 18 of file compression.h.
{ return 1; }
bool Botan::Compressor_Transform::valid_nonce_length | ( | size_t | nonce_len | ) | const [inline, override, virtual] |
Return true iff nonce_len is a valid length for the nonce
Implements Botan::Transform.
Definition at line 24 of file compression.h.
{ return nonce_len == 0; }