Botan  1.11.10
Public Member Functions | List of all members
Botan::Bzip_Decompression Class Reference

#include <bzip2.h>

Inheritance diagram for Botan::Bzip_Decompression:
Botan::Stream_Decompression Botan::Compressor_Transformation Botan::Transformation

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

Bzip Deccompression

Definition at line 40 of file bzip2.h.

Member Function Documentation

void Botan::Stream_Decompression::clear ( )
overridevirtualinherited

Implements Botan::Transformation.

Definition at line 134 of file compression.cpp.

135  {
136  m_stream.reset();
137  }
size_t Botan::Compressor_Transformation::default_nonce_length ( ) const
inlineoverridevirtualinherited

Return the default size for a nonce

Implements Botan::Transformation.

Definition at line 22 of file compression.h.

22 { return 0; }
void Botan::Stream_Decompression::finish ( secure_vector< byte > &  final_block,
size_t  offset = 0 
)
overridevirtualinherited

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::Transformation.

Definition at line 201 of file compression.cpp.

References Botan::Transformation::name().

202  {
203  if(buf.size() != offset || m_stream.get())
204  process(buf, offset, m_stream->finish_flag());
205 
206  if(m_stream.get())
207  throw std::runtime_error(name() + " finished but not at stream end");
208  }
virtual std::string name() const =0
virtual void Botan::Compressor_Transformation::flush ( secure_vector< byte > &  buf,
size_t  offset = 0 
)
inlinevirtualinherited

Reimplemented in Botan::Stream_Compression.

Definition at line 27 of file compression.h.

27 { update(buf, offset); }
virtual void update(secure_vector< byte > &blocks, size_t offset=0)=0
size_t Botan::Compressor_Transformation::minimum_final_size ( ) const
inlineoverridevirtualinherited
Returns
required minimium size to finalize() - may be any length larger than this.

Implements Botan::Transformation.

Definition at line 20 of file compression.h.

20 { return 0; }
std::string Botan::Bzip_Decompression::name ( ) const
inlineoverridevirtual

Implements Botan::Transformation.

Definition at line 43 of file bzip2.h.

43 { return "Bzip_Decompression"; }
size_t Botan::Compressor_Transformation::output_length ( size_t  input_length) const
inlineoverridevirtualinherited

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::Transformation.

Definition at line 29 of file compression.h.

30  {
31  throw std::runtime_error(name() + " output length indeterminate");
32  }
virtual std::string name() const =0
virtual std::string Botan::Transformation::provider ( ) const
inlinevirtualinherited

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 117 of file transform.h.

117 { return "core"; }
template<typename Alloc >
secure_vector<byte> Botan::Transformation::start ( const std::vector< byte, Alloc > &  nonce)
inlineinherited

Begin processing a message.

Parameters
noncethe per message nonce

Definition at line 31 of file transform.h.

32  {
33  return start(&nonce[0], nonce.size());
34  }
secure_vector< byte > start()
Definition: transform.h:60
secure_vector<byte> Botan::Transformation::start ( const byte  nonce[],
size_t  nonce_len 
)
inlineinherited

Begin processing a message.

Parameters
noncethe per message nonce
nonce_lenlength of nonce

Definition at line 52 of file transform.h.

53  {
54  return start_raw(nonce, nonce_len);
55  }
virtual secure_vector< byte > start_raw(const byte nonce[], size_t nonce_len)=0
secure_vector<byte> Botan::Transformation::start ( )
inlineinherited

Begin processing a message.

Definition at line 60 of file transform.h.

61  {
62  return start_raw(nullptr, 0);
63  }
virtual secure_vector< byte > start_raw(const byte nonce[], size_t nonce_len)=0
template<typename Alloc >
secure_vector<byte> Botan::Transformation::start_vec ( const std::vector< byte, Alloc > &  nonce)
inlineinherited

Begin processing a message.

Parameters
noncethe per message nonce

Definition at line 42 of file transform.h.

43  {
44  return start(&nonce[0], nonce.size());
45  }
secure_vector< byte > start()
Definition: transform.h:60
void Botan::Stream_Decompression::update ( secure_vector< byte > &  blocks,
size_t  offset = 0 
)
overridevirtualinherited

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::Transformation.

Definition at line 196 of file compression.cpp.

197  {
198  process(buf, offset, m_stream->run_flag());
199  }
size_t Botan::Compressor_Transformation::update_granularity ( ) const
inlineoverridevirtualinherited
Returns
size of required blocks to update

Implements Botan::Transformation.

Definition at line 18 of file compression.h.

18 { return 1; }
bool Botan::Compressor_Transformation::valid_nonce_length ( size_t  nonce_len) const
inlineoverridevirtualinherited

Return true iff nonce_len is a valid length for the nonce

Implements Botan::Transformation.

Definition at line 24 of file compression.h.

25  { return nonce_len == 0; }

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