6 #ifndef CRYPTOPP_QUEUE_H 7 #define CRYPTOPP_QUEUE_H 41 {
return CurrentSize();}
46 byte * CreatePutSpace(
size_t &size);
47 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
49 size_t Get(
byte &outByte);
50 size_t Get(
byte *outString,
size_t getMax);
52 size_t Peek(
byte &outByte)
const;
53 size_t Peek(
byte *outString,
size_t peekMax)
const;
61 void SetNodeSize(
size_t nodeSize);
65 lword CurrentSize()
const;
77 void Unget(
byte inByte);
83 void Unget(
const byte *inString,
size_t length);
93 const byte * Spy(
size_t &contiguousSize)
const;
105 void LazyPut(
const byte *inString,
size_t size);
117 void LazyPutModifiable(
byte *inString,
size_t size);
126 void UndoLazyPut(
size_t size);
132 void FinalizeLazyPut();
170 : m_queue(queue), m_node(NULLPTR), m_position(0), m_offset(0), m_lazyString(NULLPTR), m_lazyLength(0)
173 lword GetCurrentPosition() {
return m_position;}
176 {
return m_queue.CurrentSize() - m_position;}
180 size_t Get(
byte &outByte);
181 size_t Get(
byte *outString,
size_t getMax);
183 size_t Peek(
byte &outByte)
const;
184 size_t Peek(
byte *outString,
size_t peekMax)
const;
191 const ByteQueueNode *m_node;
194 const byte *m_lazyString;
201 void CleanupUsedNodes();
206 ByteQueueNode *m_head, *m_tail;
210 bool m_lazyStringModifiable;
222 try {m_bq.FinalizeLazyPut();}
234 : m_bq(bq) {bq.
LazyPut(inString, size);}
265 template<>
inline void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b)
Base class for all exceptions thrown by the library.
LazyPutter(ByteQueue &bq, const byte *inString, size_t size)
Construct a LazyPutter.
void LazyPutModifiable(byte *inString, size_t size)
Insert data in the queue.
Helper class to finalize Puts on ByteQueue.
Classes providing basic library services.
Abstract base classes that provide a uniform interface to this library.
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
Helper class to finalize Puts on ByteQueue.
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
bool operator==(const OID &lhs, const OID &rhs)
Compare two OIDs for equality.
LazyPutterModifiable(ByteQueue &bq, byte *inString, size_t size)
Construct a LazyPutterModifiable.
const std::string DEFAULT_CHANNEL
Default channel for BufferedTransformation.
bool operator!=(const ByteQueue &rhs) const
Bitwise compare two ByteQueue.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.
Data structure used to store byte strings.
word64 lword
Large word type.
bool AnyRetrievable() const
Determines whether bytes are ready for retrieval.
unsigned char byte
8-bit unsigned datatype
const lword LWORD_MAX
Large word type max value.
void LazyPut(const byte *inString, size_t size)
Insert data in the queue.
Crypto++ library namespace.
void swap(::SecBlock< T, A > &a, ::SecBlock< T, A > &b)
Swap two SecBlocks.
Walker(const ByteQueue &queue)
Construct a ByteQueue Walker.
Base class for bufferless filters.
Interface for retrieving values given their names.