Botan 3.6.1
Crypto and TLS for C&
|
#include <secqueue.h>
Public Member Functions | |
bool | attachable () override |
bool | check_available (size_t n) override |
size_t | discard_next (size_t N) |
bool | empty () const |
virtual void | end_msg () |
bool | end_of_data () const override |
size_t | get_bytes_read () const override |
virtual std::string | id () const |
std::string | name () const override |
SecureQueue & | operator= (const SecureQueue &other) |
SecureQueue & | operator= (SecureQueue &&other)=delete |
size_t | peek (uint8_t[], size_t, size_t=0) const override |
size_t | peek_byte (uint8_t &out) const |
size_t | read (uint8_t[], size_t) override |
size_t | read_byte (uint8_t &out) |
SecureQueue () | |
SecureQueue (const SecureQueue &other) | |
SecureQueue (SecureQueue &&other)=delete | |
size_t | size () const |
virtual void | start_msg () |
void | write (const uint8_t[], size_t) override |
~SecureQueue () override | |
Protected Member Functions | |
void | attach (Filter *f) |
void | incr_owns () |
template<typename Alloc > | |
void | send (const std::vector< uint8_t, Alloc > &in) |
template<typename Alloc > | |
void | send (const std::vector< uint8_t, Alloc > &in, size_t length) |
virtual void | send (const uint8_t in[], size_t length) |
void | send (uint8_t in) |
void | set_next (Filter *f[], size_t n) |
void | set_port (size_t n) |
A queue that knows how to zeroize itself
Definition at line 20 of file secqueue.h.
|
delete |
Botan::SecureQueue::SecureQueue | ( | ) |
SecureQueue default constructor (creates empty queue)
Definition at line 72 of file secqueue.cpp.
References Botan::Fanout_Filter::set_next().
Botan::SecureQueue::SecureQueue | ( | const SecureQueue & | other | ) |
SecureQueue copy constructor
other | the queue to copy |
Definition at line 81 of file secqueue.cpp.
References Botan::Fanout_Filter::set_next(), and write().
|
inlineoverride |
Definition at line 64 of file secqueue.h.
|
inlineprotectedinherited |
Definition at line 156 of file filter.h.
Referenced by Botan::Chain::Chain(), and Botan::Chain::Chain().
|
inlineoverridevirtual |
Check whether this filter is an attachable filter.
Reimplemented from Botan::Filter.
Definition at line 42 of file secqueue.h.
|
inlineoverridevirtual |
|
inherited |
Discard the next N bytes of the data
N | the number of bytes to discard |
Definition at line 40 of file data_src.cpp.
References Botan::DataSource::read().
bool Botan::SecureQueue::empty | ( | ) | const |
Definition at line 218 of file secqueue.cpp.
References size().
|
inlinevirtualinherited |
Notify that the current message is finished; flush buffers and do end-of-message processing (if any).
Reimplemented in Botan::Base64_Decoder, Botan::Base64_Encoder, Botan::DataSink_Stream, Botan::Hex_Decoder, and Botan::Hex_Encoder.
Definition at line 46 of file filter.h.
|
overridevirtual |
Test whether the source still has data that can be read.
Implements Botan::DataSource.
Definition at line 214 of file secqueue.cpp.
References size().
|
overridevirtual |
Return how many bytes have been read so far.
Implements Botan::DataSource.
Definition at line 193 of file secqueue.cpp.
Referenced by Botan::Output_Buffers::get_bytes_read(), and operator=().
|
inlinevirtualinherited |
return the id of this data source
Reimplemented in Botan::DataSource_Stream.
Definition at line 61 of file data_src.h.
|
inlineprotectedinherited |
Increment the number of filters past us that we own
Definition at line 150 of file filter.h.
Referenced by Botan::Chain::Chain(), and Botan::Chain::Chain().
|
inlineoverridevirtual |
Implements Botan::Filter.
Definition at line 23 of file secqueue.h.
SecureQueue & Botan::SecureQueue::operator= | ( | const SecureQueue & | other | ) |
SecureQueue assignment
other | the queue to copy |
Definition at line 109 of file secqueue.cpp.
References get_bytes_read(), and write().
|
delete |
|
overridevirtual |
Read from the source but do not modify the internal offset. Consecutive calls to peek() will return portions of the source starting at the same position.
out | the byte array to write the output to |
length | the length of the byte array out |
peek_offset | the offset into the stream to read at |
Implements Botan::DataSource.
Definition at line 166 of file secqueue.cpp.
Referenced by Botan::Output_Buffers::peek().
|
inherited |
Peek at one byte.
out | an output byte |
Definition at line 33 of file data_src.cpp.
References Botan::DataSource::peek().
Referenced by Botan::ASN1::maybe_BER().
|
overridevirtual |
Read from the source. Moves the internal offset so that every call to read will return a new portion of the source.
out | the byte array to write the result to |
length | the length of the byte array out |
Implements Botan::DataSource.
Definition at line 146 of file secqueue.cpp.
Referenced by Botan::Output_Buffers::read().
|
inherited |
Read one byte.
out | the byte to read to |
Definition at line 26 of file data_src.cpp.
References Botan::DataSource::read().
Referenced by Botan::PEM_Code::decode(), Botan::BER_Decoder::discard_remaining(), and Botan::ASN1::maybe_BER().
|
inlineprotectedinherited |
|
inlineprotectedinherited |
in | some input for the filter |
length | the number of bytes of in to send |
Definition at line 85 of file filter.h.
References BOTAN_ASSERT_NOMSG.
|
protectedvirtualinherited |
in | some input for the filter |
length | the length of in |
Definition at line 27 of file filter.cpp.
Referenced by Botan::Base64_Decoder::end_msg(), Botan::Base64_Encoder::end_msg(), Botan::Hex_Decoder::end_msg(), Botan::Hex_Encoder::end_msg(), Botan::Base64_Decoder::write(), and Botan::Hex_Decoder::write().
|
inlineprotectedinherited |
in | some input for the filter |
Definition at line 70 of file filter.h.
References Botan::Filter::send().
Referenced by Botan::Filter::send().
|
inlineprotectedinherited |
Definition at line 154 of file filter.h.
Referenced by Botan::Fork::Fork(), Botan::Fork::Fork(), SecureQueue(), and SecureQueue().
|
inlineprotectedinherited |
size_t Botan::SecureQueue::size | ( | ) | const |
Definition at line 200 of file secqueue.cpp.
Referenced by empty(), end_of_data(), and Botan::Output_Buffers::remaining().
|
inlinevirtualinherited |
|
overridevirtual |
Write a portion of a message to this filter.
input | the input as a byte array |
length | the length of the byte array input |
Implements Botan::Filter.
Definition at line 128 of file secqueue.cpp.
Referenced by operator=(), and SecureQueue().