Crypto++
8.3
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
6 #ifndef CRYPTOPP_QUEUE_H
7 #define CRYPTOPP_QUEUE_H
34 {
return CurrentSize();}
39 byte * CreatePutSpace(
size_t &size);
40 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
42 size_t Get(
byte &outByte);
43 size_t Get(
byte *outString,
size_t getMax);
45 size_t Peek(
byte &outByte)
const;
46 size_t Peek(
byte *outString,
size_t peekMax)
const;
52 void SetNodeSize(
size_t nodeSize);
54 lword CurrentSize()
const;
59 void Unget(
byte inByte);
60 void Unget(
const byte *inString,
size_t length);
62 const byte * Spy(
size_t &contiguousSize)
const;
64 void LazyPut(
const byte *inString,
size_t size);
65 void LazyPutModifiable(
byte *inString,
size_t size);
66 void UndoLazyPut(
size_t size);
67 void FinalizeLazyPut();
72 byte operator[](lword i)
const;
82 : m_queue(queue), m_node(NULLPTR), m_position(0), m_offset(0), m_lazyString(NULLPTR), m_lazyLength(0)
85 lword GetCurrentPosition() {
return m_position;}
88 {
return m_queue.CurrentSize() - m_position;}
92 size_t Get(
byte &outByte);
93 size_t Get(
byte *outString,
size_t getMax);
95 size_t Peek(
byte &outByte)
const;
96 size_t Peek(
byte *outString,
size_t peekMax)
const;
106 const byte *m_lazyString;
113 void CleanupUsedNodes();
122 bool m_lazyStringModifiable;
130 : m_bq(bq) {bq.LazyPut(inString, size);}
144 :
LazyPutter(bq) {bq.LazyPutModifiable(inString, size);}
151 template<>
inline void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b)
use this to make sure LazyPut is finalized in event of exception
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
void swap(::SecBlock< T, A > &a, ::SecBlock< T, A > &b)
Swap two SecBlocks.
Data structure used to store byte strings.
Walker(const ByteQueue &queue)
Construct a ByteQueue Walker.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.
const std::string DEFAULT_CHANNEL
Default channel for BufferedTransformation.
Classes providing basic library services.
Base class for all exceptions thrown by the library.
bool operator==(const OID &lhs, const OID &rhs)
Compare two OIDs for equality.
like LazyPutter, but does a LazyPutModifiable instead
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
Base class for bufferless filters.
bool AnyRetrievable() const
Determines whether bytes are ready for retrieval.
Crypto++ library namespace.
bool operator!=(const OID &lhs, const OID &rhs)
Compare two OIDs for inequality.
Interface for retrieving values given their names.
Abstract base classes that provide a uniform interface to this library.