Botan  1.11.15
Public Types | Public Member Functions
Botan::Zlib_Decompression Class Reference

#include <zlib.h>

Inheritance diagram for Botan::Zlib_Decompression:
Botan::Stream_Decompression Botan::Compressor_Transform Botan::Transform

List of all members.

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
virtual void flush (secure_vector< byte > &buf, size_t offset=0)
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< bytestart (const std::vector< byte, Alloc > &nonce)
secure_vector< bytestart (const byte nonce[], size_t nonce_len)
secure_vector< bytestart ()
template<typename Alloc >
secure_vector< bytestart_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

Detailed Description

Zlib Decompression

Definition at line 41 of file zlib.h.


Member Typedef Documentation

typedef SCAN_Name Botan::Transform::Spec [inherited]

Definition at line 27 of file transform.h.


Member Function Documentation

void Botan::Stream_Decompression::clear ( ) [override, virtual, inherited]

Implements Botan::Transform.

Definition at line 135 of file compression.cpp.

   {
   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_Decompression::finish ( secure_vector< byte > &  final_block,
size_t  offset = 0 
) [override, virtual, inherited]

Complete processing of a message.

Parameters:
final_blockin/out parameter which must be at least minimum_final_size() bytes, and will be set to any final output
offsetan offset into final_block to begin processing

Implements Botan::Transform.

Definition at line 202 of file compression.cpp.

References Botan::Transform::name().

   {
   if(buf.size() != offset || m_stream.get())
      process(buf, offset, m_stream->finish_flag());

   if(m_stream.get())
      throw std::runtime_error(name() + " finished but not at stream end");
   }
virtual void Botan::Compressor_Transform::flush ( secure_vector< byte > &  buf,
size_t  offset = 0 
) [inline, virtual, inherited]

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, inherited]
Returns:
required minimium size to finalize() - may be any length larger than this.

Implements Botan::Transform.

Definition at line 20 of file compression.h.

{ return 0; }
std::string Botan::Zlib_Decompression::name ( ) const [inline, override, virtual]

Implements Botan::Transform.

Definition at line 44 of file zlib.h.

{ return "Zlib_Decompression"; }
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"; }
template<typename Alloc >
secure_vector<byte> Botan::Transform::start ( const std::vector< byte, Alloc > &  nonce) [inline, inherited]

Begin processing a message.

Parameters:
noncethe 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.

Parameters:
noncethe per message nonce
nonce_lenlength 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);
         }
template<typename Alloc >
secure_vector<byte> Botan::Transform::start_vec ( const std::vector< byte, Alloc > &  nonce) [inline, inherited]

Begin processing a message.

Parameters:
noncethe per message nonce

Definition at line 45 of file transform.h.

         {
         return start(&nonce[0], nonce.size());
         }
void Botan::Stream_Decompression::update ( secure_vector< byte > &  blocks,
size_t  offset = 0 
) [override, virtual, inherited]

Process some data. Input must be in size update_granularity() byte blocks.

Parameters:
blocksin/out paramter which will possibly be resized
offsetan offset into blocks to begin processing

Implements Botan::Transform.

Definition at line 197 of file compression.cpp.

   {
   process(buf, offset, m_stream->run_flag());
   }
size_t Botan::Compressor_Transform::update_granularity ( ) const [inline, override, virtual, inherited]
Returns:
size of required blocks to update

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; }

The documentation for this class was generated from the following files: