Botan
1.11.15
|
#include <zlib.h>
Public Types | |
typedef SCAN_Name | Spec |
Public Member Functions | |
void | clear () override |
size_t | default_nonce_length () const override |
void | finish (secure_vector< byte > &buf, size_t offset=0) override |
void | flush (secure_vector< byte > &buf, size_t offset=0) override |
size_t | minimum_final_size () const override |
std::string | name () const override |
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 () |
template<typename Alloc > | |
secure_vector< byte > | start_vec (const std::vector< byte, Alloc > &nonce) |
void | update (secure_vector< byte > &buf, size_t offset=0) override |
size_t | update_granularity () const override |
bool | valid_nonce_length (size_t nonce_len) const override |
Zlib_Compression (size_t level=6) |
typedef SCAN_Name Botan::Transform::Spec [inherited] |
Definition at line 27 of file transform.h.
Botan::Zlib_Compression::Zlib_Compression | ( | size_t | level = 6 | ) | [inline] |
void Botan::Stream_Compression::clear | ( | ) | [override, virtual, inherited] |
Implements Botan::Transform.
Definition at line 73 of file compression.cpp.
Referenced by Botan::Stream_Compression::finish().
{ m_stream.reset(); }
size_t Botan::Compressor_Transform::default_nonce_length | ( | ) | const [inline, override, virtual, inherited] |
Return the default size for a nonce
Implements Botan::Transform.
Definition at line 22 of file compression.h.
{ return 0; }
void Botan::Stream_Compression::finish | ( | secure_vector< byte > & | final_block, |
size_t | offset = 0 |
||
) | [override, 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 |
Implements Botan::Transform.
Definition at line 129 of file compression.cpp.
References Botan::Stream_Compression::clear().
{ process(buf, offset, m_stream->finish_flag()); clear(); }
void Botan::Stream_Compression::flush | ( | secure_vector< byte > & | buf, |
size_t | offset = 0 |
||
) | [override, virtual, inherited] |
Reimplemented from Botan::Compressor_Transform.
Definition at line 124 of file compression.cpp.
{ process(buf, offset, m_stream->flush_flag()); }
size_t Botan::Compressor_Transform::minimum_final_size | ( | ) | const [inline, override, virtual, inherited] |
Implements Botan::Transform.
Definition at line 20 of file compression.h.
{ return 0; }
std::string Botan::Zlib_Compression::name | ( | ) | const [inline, override, virtual] |
size_t Botan::Compressor_Transform::output_length | ( | size_t | input_length | ) | const [inline, override, virtual, inherited] |
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); }
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()); }
void Botan::Stream_Compression::update | ( | secure_vector< byte > & | blocks, |
size_t | offset = 0 |
||
) | [override, 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 |
Implements Botan::Transform.
Definition at line 119 of file compression.cpp.
{ process(buf, offset, m_stream->run_flag()); }
size_t Botan::Compressor_Transform::update_granularity | ( | ) | const [inline, override, virtual, inherited] |
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, inherited] |
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; }