Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
Interface for buffered transformations. More...
Classes | |
class | BlockingInputOnly |
Exception thrown by objects that have not implemented nonblocking input processing. More... | |
struct | InvalidChannelName |
Exception thrown when a filter does not recognize a named channel. More... | |
struct | NoChannelSupport |
Exception thrown when a filter does not support named channels. More... | |
Public Member Functions | |
BufferedTransformation () | |
Construct a BufferedTransformation. | |
BufferedTransformation & | Ref () |
Provides a reference to this object. More... | |
![]() | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. More... | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. More... | |
![]() | |
virtual Clonable * | Clone () const |
Copies this object. More... | |
![]() | |
bool | Wait (unsigned long milliseconds, CallStack const &callStack) |
Wait on this object. More... | |
Static Public Attributes | |
static const std::string & | NULL_CHANNEL = DEFAULT_CHANNEL |
INPUT | |
size_t | Put (byte inByte, bool blocking=true) |
Input a byte for processing. More... | |
size_t | Put (const byte *inString, size_t length, bool blocking=true) |
Input a byte buffer for processing. More... | |
size_t | PutWord16 (word16 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 16-bit word for processing. More... | |
size_t | PutWord32 (word32 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 32-bit word for processing. More... | |
virtual byte * | CreatePutSpace (size_t &size) |
Request space which can be written into by the caller. More... | |
virtual bool | CanModifyInput () const |
Determines whether input can be modifed by the callee. More... | |
size_t | PutModifiable (byte *inString, size_t length, bool blocking=true) |
Input multiple bytes that may be modified by callee. More... | |
bool | MessageEnd (int propagation=-1, bool blocking=true) |
Signals the end of messages to the object. More... | |
size_t | PutMessageEnd (const byte *inString, size_t length, int propagation=-1, bool blocking=true) |
Input multiple bytes for processing and signal the end of a message. More... | |
virtual size_t | Put2 (const byte *inString, size_t length, int messageEnd, bool blocking)=0 |
Input multiple bytes for processing. More... | |
virtual size_t | PutModifiable2 (byte *inString, size_t length, int messageEnd, bool blocking) |
Input multiple bytes that may be modified by callee. More... | |
WAITING | |
unsigned int | GetMaxWaitObjectCount () const |
Retrieves the maximum number of waitable objects. | |
void | GetWaitObjects (WaitObjectContainer &container, CallStack const &callStack) |
Retrieves waitable objects. More... | |
SIGNALS | |
virtual void | IsolatedInitialize (const NameValuePairs ¶meters) |
Initialize or reinitialize this object, without signal propagation. More... | |
virtual bool | IsolatedFlush (bool hardFlush, bool blocking)=0 |
Flushes data buffered by this object, without signal propagation. More... | |
virtual bool | IsolatedMessageSeriesEnd (bool blocking) |
Marks the end of a series of messages, without signal propagation. More... | |
virtual void | Initialize (const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1) |
Initialize or reinitialize this object, with signal propagation. More... | |
virtual bool | Flush (bool hardFlush, int propagation=-1, bool blocking=true) |
Flush buffered input and/or output, with signal propagation. More... | |
virtual bool | MessageSeriesEnd (int propagation=-1, bool blocking=true) |
Marks the end of a series of messages, with signal propagation. More... | |
virtual void | SetAutoSignalPropagation (int propagation) |
Set propagation of automatically generated and transferred signals. More... | |
virtual int | GetAutoSignalPropagation () const |
Retrieve automatic signal propagation value. More... | |
RETRIEVAL OF ONE MESSAGE | |
virtual lword | MaxRetrievable () const |
Provides the number of bytes ready for retrieval. More... | |
virtual bool | AnyRetrievable () const |
Determines whether bytes are ready for retrieval. More... | |
virtual size_t | Get (byte &outByte) |
Retrieve a 8-bit byte. More... | |
virtual size_t | Get (byte *outString, size_t getMax) |
Retrieve a block of bytes. More... | |
virtual size_t | Peek (byte &outByte) const |
Peek a 8-bit byte. More... | |
virtual size_t | Peek (byte *outString, size_t peekMax) const |
Peek a block of bytes. More... | |
size_t | GetWord16 (word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) |
Retrieve a 16-bit word. More... | |
size_t | GetWord32 (word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) |
Retrieve a 32-bit word. More... | |
size_t | PeekWord16 (word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) const |
Peek a 16-bit word. More... | |
size_t | PeekWord32 (word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) const |
Peek a 32-bit word. More... | |
lword | TransferTo (BufferedTransformation &target, lword transferMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) |
move transferMax bytes of the buffered output to target as input More... | |
virtual lword | Skip (lword skipMax=LWORD_MAX) |
Discard skipMax bytes from the output buffer. More... | |
lword | CopyTo (BufferedTransformation &target, lword copyMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) const |
copy copyMax bytes of the buffered output to target as input More... | |
lword | CopyRangeTo (BufferedTransformation &target, lword position, lword copyMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) const |
Copy bytes from this object using an index to another BufferedTransformation. More... | |
RETRIEVAL OF MULTIPLE MESSAGES | |
virtual lword | TotalBytesRetrievable () const |
Provides the number of bytes ready for retrieval. More... | |
virtual unsigned int | NumberOfMessages () const |
Provides the number of meesages processed by this object. More... | |
virtual bool | AnyMessages () const |
Determines if any messages are available for retrieval. More... | |
virtual bool | GetNextMessage () |
Start retrieving the next message. More... | |
virtual unsigned int | SkipMessages (unsigned int count=UINT_MAX) |
Skip a number of meessages. More... | |
unsigned int | TransferMessagesTo (BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=DEFAULT_CHANNEL) |
Transfer messages from this object to another BufferedTransformation. More... | |
unsigned int | CopyMessagesTo (BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=DEFAULT_CHANNEL) const |
Copy messages from this object to another BufferedTransformation. More... | |
virtual void | SkipAll () |
Skip all messages in the series. | |
void | TransferAllTo (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL) |
Transfer all bytes from this object to another BufferedTransformation. More... | |
void | CopyAllTo (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL) const |
Copy messages from this object to another BufferedTransformation. More... | |
virtual bool | GetNextMessageSeries () |
Retrieve the next message in a series. More... | |
virtual unsigned int | NumberOfMessagesInThisSeries () const |
Provides the number of messages in a series. More... | |
virtual unsigned int | NumberOfMessageSeries () const |
Provides the number of messages in a series. More... | |
NON-BLOCKING TRANSFER OF OUTPUT | |
virtual size_t | TransferTo2 (BufferedTransformation &target, lword &byteCount, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true)=0 |
Transfer bytes from this object to another BufferedTransformation. More... | |
virtual size_t | CopyRangeTo2 (BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const =0 |
Copy bytes from this object to another BufferedTransformation. More... | |
size_t | TransferMessagesTo2 (BufferedTransformation &target, unsigned int &messageCount, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) |
Transfer messages from this object to another BufferedTransformation. More... | |
size_t | TransferAllTo2 (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) |
Transfer all bytes from this object to another BufferedTransformation. More... | |
CHANNELS | |
size_t | ChannelPut (const std::string &channel, byte inByte, bool blocking=true) |
Input a byte for processing on a channel. More... | |
size_t | ChannelPut (const std::string &channel, const byte *inString, size_t length, bool blocking=true) |
Input a byte buffer for processing on a channel. More... | |
size_t | ChannelPutModifiable (const std::string &channel, byte *inString, size_t length, bool blocking=true) |
Input multiple bytes that may be modified by callee on a channel. More... | |
size_t | ChannelPutWord16 (const std::string &channel, word16 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 16-bit word for processing on a channel. More... | |
size_t | ChannelPutWord32 (const std::string &channel, word32 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 32-bit word for processing on a channel. More... | |
bool | ChannelMessageEnd (const std::string &channel, int propagation=-1, bool blocking=true) |
Signal the end of a message. More... | |
size_t | ChannelPutMessageEnd (const std::string &channel, const byte *inString, size_t length, int propagation=-1, bool blocking=true) |
Input multiple bytes for processing and signal the end of a message. More... | |
virtual byte * | ChannelCreatePutSpace (const std::string &channel, size_t &size) |
Request space which can be written into by the caller. More... | |
virtual size_t | ChannelPut2 (const std::string &channel, const byte *inString, size_t length, int messageEnd, bool blocking) |
Input multiple bytes for processing on a channel. More... | |
virtual size_t | ChannelPutModifiable2 (const std::string &channel, byte *inString, size_t length, int messageEnd, bool blocking) |
Input multiple bytes that may be modified by callee on a channel. More... | |
virtual bool | ChannelFlush (const std::string &channel, bool hardFlush, int propagation=-1, bool blocking=true) |
Flush buffered input and/or output on a channel. More... | |
virtual bool | ChannelMessageSeriesEnd (const std::string &channel, int propagation=-1, bool blocking=true) |
Marks the end of a series of messages on a channel. More... | |
virtual void | SetRetrievalChannel (const std::string &channel) |
Sets the default retrieval channel. More... | |
ATTACHMENT | |
Some BufferedTransformation objects (e.g. Filter objects) allow other BufferedTransformation objects to be attached. When this is done, the first object instead of buffering its output, sends that output to the attached object as input. The entire attachment chain is deleted when the anchor object is destructed. | |
virtual bool | Attachable () |
Determines whether the object allows attachment. More... | |
virtual BufferedTransformation * | AttachedTransformation () |
Returns the object immediately attached to this object. More... | |
virtual const BufferedTransformation * | AttachedTransformation () const |
Returns the object immediately attached to this object. More... | |
virtual void | Detach (BufferedTransformation *newAttachment=0) |
Delete the current attachment chain and attach a new one. More... | |
virtual void | Attach (BufferedTransformation *newAttachment) |
Add newAttachment to the end of attachment chain. More... | |
Interface for buffered transformations.
BufferedTransformation is a generalization of BlockTransformation, StreamTransformation and HashTransformation. A buffered transformation is an object that takes a stream of bytes as input (this may be done in stages), does some computation on them, and then places the result into an internal buffer for later retrieval. Any partial result already in the output buffer is not modified by further input. If a method takes a "blocking" parameter, and you pass false for it, then the method will return before all input has been processed if the input cannot be processed without waiting (for network buffers to become available, for example). In this case the method will return true or a non-zero integer value. When this happens you must continue to call the method with the same parameters until it returns false or zero, before calling any other method on it or attached /p BufferedTransformation. The integer return value in this case is approximately the number of bytes left to be processed, and can be used to implement a progress bar. For functions that take a "propagation" parameter, propagation != 0
means pass on the signal to attached BufferedTransformation objects, with propagation decremented at each step until it reaches 0
. -1
means unlimited propagation. All of the retrieval functions, like Get() and GetWord32(), return the actual number of bytes retrieved, which is the lesser of the request number and MaxRetrievable(). Most of the input functions, like Put() and PutWord32(), return the number of bytes remaining to be processed. A 0 value means all bytes were processed, and a non-0 value means bytes remain to be processed.
Definition at line 1352 of file cryptlib.h.
|
inline |
Provides a reference to this object.
Definition at line 1368 of file cryptlib.h.
|
inline |
Input a byte for processing.
inByte | the 8-bit byte (octet) to be processed. |
blocking | specifies whether the object should block when processing input. |
Put(byte)
calls Put(byte*, size_t)
. Definition at line 1378 of file cryptlib.h.
|
inline |
Input a byte buffer for processing.
inString | the byte buffer to process |
length | the size of the string, in bytes |
blocking | specifies whether the object should block when processing input |
Definition at line 1387 of file cryptlib.h.
size_t BufferedTransformation::PutWord16 | ( | word16 | value, |
ByteOrder | order = BIG_ENDIAN_ORDER , |
||
bool | blocking = true |
||
) |
Input a 16-bit word for processing.
value | the 16-bit value to be processed |
order | the ByteOrder in which the word should be processed |
blocking | specifies whether the object should block when processing input |
Definition at line 718 of file cryptlib.cpp.
size_t BufferedTransformation::PutWord32 | ( | word32 | value, |
ByteOrder | order = BIG_ENDIAN_ORDER , |
||
bool | blocking = true |
||
) |
Input a 32-bit word for processing.
value | the 32-bit value to be processed. |
order | the ByteOrder in which the word should be processed. |
blocking | specifies whether the object should block when processing input. |
Definition at line 723 of file cryptlib.cpp.
|
inlinevirtual |
Request space which can be written into by the caller.
size | the requested size of the buffer The purpose of this method is to help avoid extra memory allocations. size is an IN and OUT parameter and used as a hint. When the call is made, size is the requested size of the buffer. When the call returns, size is the size of the array returned to the caller. The base class implementation sets size to 0 and returns NULL. |
Reimplemented in ByteQueue, ArrayXorSink, ArraySink, OutputProxy, Redirector, HashFilter, and MeterFilter.
Definition at line 1413 of file cryptlib.h.
|
inlinevirtual |
Determines whether input can be modifed by the callee.
Reimplemented in Redirector.
Definition at line 1419 of file cryptlib.h.
|
inline |
Input multiple bytes that may be modified by callee.
inString | the byte buffer to process |
length | the size of the string, in bytes |
blocking | specifies whether the object should block when processing input |
Definition at line 1428 of file cryptlib.h.
|
inline |
Signals the end of messages to the object.
propagation | the number of attached transformations the MessageEnd() signal should be passed |
blocking | specifies whether the object should block when processing input propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation. |
Definition at line 1436 of file cryptlib.h.
|
inline |
Input multiple bytes for processing and signal the end of a message.
inString | the byte buffer to process |
length | the size of the string, in bytes |
propagation | the number of attached transformations the MessageEnd() signal should be passed |
blocking | specifies whether the object should block when processing input |
1
means this object only. Setting propagation to -1
means unlimited propagation. Definition at line 1449 of file cryptlib.h.
|
pure virtual |
Input multiple bytes for processing.
inString | the byte buffer to process |
length | the size of the string, in bytes |
messageEnd | means how many filters to signal MessageEnd() to, including this one |
blocking | specifies whether the object should block when processing input Derived classes must implement Put2(). |
Implemented in Inflator, Deflator, FilterTester, BitBucket, InputRejecting< BufferedTransformation >, InputRejecting< Filter >, MaurerRandomnessTest, ByteQueue, NetworkSink, ArrayXorSink, ArraySink, RandomNumberSink, StringSinkTemplate< T >, StringSinkTemplate< std::string >, OutputProxy, Redirector, SignerFilter, HashFilter, FilterWithInputQueue, FilterWithBufferedInput, MeterFilter, FileSink, PK_DefaultDecryptionFilter, PK_DefaultEncryptionFilter, MessageQueue, PaddingRemover, InformationDispersal, SecretSharing, Grouper, BaseN_Decoder, and BaseN_Encoder.
|
inlinevirtual |
Input multiple bytes that may be modified by callee.
inString | the byte buffer to process. |
length | the size of the string, in bytes. |
messageEnd | means how many filters to signal MessageEnd() to, including this one. |
blocking | specifies whether the object should block when processing input. Internally, PutModifiable2() calls Put2(). |
Reimplemented in FilterWithBufferedInput, MeterFilter, and OutputProxy.
Definition at line 1466 of file cryptlib.h.
|
virtual |
Retrieves waitable objects.
container | the wait container to receive the references to the objects |
callStack | CallStack object used to select waitable objects GetWaitObjects is usually called in one of two ways. First, it can be called like something.GetWaitObjects(c, CallStack("my func after X", 0)); . Second, if in an outer GetWaitObjects() method that itself takes a callStack parameter, it can be called like innerThing.GetWaitObjects(c, CallStack("MyClass::GetWaitObjects at X", &callStack)); . |
Implements Waitable.
Reimplemented in NetworkSink, NetworkSource, and Redirector.
Definition at line 432 of file cryptlib.cpp.
|
inlinevirtual |
Initialize or reinitialize this object, without signal propagation.
parameters | a set of NameValuePairs to initialize this object |
NotImplemented | IsolatedInitialize() is used to initialize or reinitialize an object using a variable number of arbitrarily typed arguments. The function avoids the need for multiple constuctors providing all possible combintations of configurable parameters. IsolatedInitialize() does not call Initialize() on attached transformations. If initialization should be propagated, then use the Initialize() function. If a derived class does not override IsolatedInitialize(), then the base class throws NotImplemented. |
Reimplemented in BitBucket, InformationRecovery, InformationDispersal, SecretRecovery, SecretSharing, RawIDA, ChannelSwitch, Inflator, Deflator, Store, ByteQueue::Walker, ByteQueue, MessageQueue, PaddingRemover, HexDecoder, HexEncoder, SourceTemplate< T >, SourceTemplate< FileStore >, SourceTemplate< RandomNumberStore >, SourceTemplate< StringStore >, ArraySink, RandomNumberSink, StringSinkTemplate< T >, StringSinkTemplate< std::string >, SignerFilter, AuthenticatedEncryptionFilter, HashFilter, FilterWithBufferedInput, MeterFilter, FileSink, Grouper, BaseN_Decoder, BaseN_Encoder, Base64URLDecoder, Base64URLEncoder, Base64Decoder, Base64Encoder, Base32Decoder, and Base32Encoder.
Definition at line 1505 of file cryptlib.h.
|
pure virtual |
Flushes data buffered by this object, without signal propagation.
hardFlush | indicates whether all data should be flushed |
blocking | specifies whether the object should block when processing input |
Implemented in Inflator, Deflator, NonblockingSink, MessageQueue, ProxyFilter, FilterWithBufferedInput, and FileSink.
|
inlinevirtual |
Marks the end of a series of messages, without signal propagation.
blocking | specifies whether the object should block when completing the processing on the current series of messages |
Reimplemented in MessageQueue, and MeterFilter.
Definition at line 1519 of file cryptlib.h.
|
virtual |
Initialize or reinitialize this object, with signal propagation.
parameters | a set of NameValuePairs to initialize or reinitialize this object |
propagation | the number of attached transformations the Initialize() signal should be passed Initialize() is used to initialize or reinitialize an object using a variable number of arbitrarily typed arguments. The function avoids the need for multiple constuctors providing all possible combintations of configurable parameters. propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation. |
Reimplemented in OutputProxy, Filter, and Redirector.
Definition at line 439 of file cryptlib.cpp.
|
virtual |
Flush buffered input and/or output, with signal propagation.
hardFlush | is used to indicate whether all data should be flushed |
propagation | the number of attached transformations the Flush() signal should be passed |
blocking | specifies whether the object should block when processing input propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation. |
Reimplemented in InformationDispersal, SecretSharing, OutputProxy, Redirector, and Filter.
Definition at line 446 of file cryptlib.cpp.
|
virtual |
Marks the end of a series of messages, with signal propagation.
propagation | the number of attached transformations the MessageSeriesEnd() signal should be passed |
blocking | specifies whether the object should block when processing input Each object that receives the signal will perform its processing, decrement propagation, and then pass the signal on to attached transformations if the value is not 0. propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation. |
Reimplemented in OutputProxy, Redirector, and Filter.
Definition at line 453 of file cryptlib.cpp.
|
inlinevirtual |
Set propagation of automatically generated and transferred signals.
propagation | then new value Setting propagation to 0 means do not automaticly generate signals. Setting propagation to -1 means unlimited propagation. |
Reimplemented in SourceTemplate< T >, SourceTemplate< FileStore >, SourceTemplate< RandomNumberStore >, and SourceTemplate< StringStore >.
Definition at line 1562 of file cryptlib.h.
|
inlinevirtual |
Retrieve automatic signal propagation value.
Reimplemented in SourceTemplate< T >.
Definition at line 1568 of file cryptlib.h.
|
virtual |
Provides the number of bytes ready for retrieval.
Reimplemented in ByteQueue::Walker, ByteQueue, MessageQueue, NullStore, RandomNumberStore, and FileStore.
Definition at line 500 of file cryptlib.cpp.
|
virtual |
Determines whether bytes are ready for retrieval.
Reimplemented in ByteQueue, MessageQueue, and RandomNumberStore.
Definition at line 508 of file cryptlib.cpp.
|
virtual |
Retrieve a 8-bit byte.
outByte | the 8-bit value to be retrieved |
Reimplemented in ByteQueue::Walker, and ByteQueue.
Definition at line 519 of file cryptlib.cpp.
|
virtual |
Retrieve a block of bytes.
outString | a block of bytes |
getMax | the number of bytes to Get |
Reimplemented in ByteQueue::Walker, and ByteQueue.
Definition at line 527 of file cryptlib.cpp.
|
virtual |
Peek a 8-bit byte.
outByte | the 8-bit value to be retrieved |
Reimplemented in ByteQueue::Walker, and ByteQueue.
Definition at line 538 of file cryptlib.cpp.
|
virtual |
Peek a block of bytes.
outString | a block of bytes |
peekMax | the number of bytes to Peek |
Reimplemented in ByteQueue::Walker, and ByteQueue.
Definition at line 546 of file cryptlib.cpp.
size_t BufferedTransformation::GetWord16 | ( | word16 & | value, |
ByteOrder | order = BIG_ENDIAN_ORDER |
||
) |
Retrieve a 16-bit word.
value | the 16-bit value to be retrieved |
order | the ByteOrder in which the word should be retrieved |
Definition at line 754 of file cryptlib.cpp.
size_t BufferedTransformation::GetWord32 | ( | word32 & | value, |
ByteOrder | order = BIG_ENDIAN_ORDER |
||
) |
Retrieve a 32-bit word.
value | the 32-bit value to be retrieved |
order | the ByteOrder in which the word should be retrieved |
Definition at line 759 of file cryptlib.cpp.
size_t BufferedTransformation::PeekWord16 | ( | word16 & | value, |
ByteOrder | order = BIG_ENDIAN_ORDER |
||
) | const |
Peek a 16-bit word.
value | the 16-bit value to be retrieved |
order | the ByteOrder in which the word should be retrieved |
Definition at line 728 of file cryptlib.cpp.
size_t BufferedTransformation::PeekWord32 | ( | word32 & | value, |
ByteOrder | order = BIG_ENDIAN_ORDER |
||
) | const |
Peek a 32-bit word.
value | the 32-bit value to be retrieved |
order | the ByteOrder in which the word should be retrieved |
Definition at line 741 of file cryptlib.cpp.
|
inline |
move transferMax bytes of the buffered output to target as input
Transfer bytes from this object to another BufferedTransformation
target | the destination BufferedTransformation |
transferMax | the number of bytes to transfer |
channel | the channel on which the transfer should occur |
Definition at line 1656 of file cryptlib.h.
|
virtual |
Discard skipMax bytes from the output buffer.
skipMax | the number of bytes to discard Skip() discards bytes from the output buffer, which is the AttachedTransformation(), if present. The function always returns skipMax. If you want to skip bytes from a Source, then perform the following. StringSource ss(str, false, new Redirector(TheBitBucket())); ss.Pump(10); // Skip 10 bytes from Source ss.Detach(new FilterChain(...)); ss.PumpAll(); |
Reimplemented in FileStore.
Definition at line 557 of file cryptlib.cpp.
|
inline |
copy copyMax bytes of the buffered output to target as input
Copy bytes from this object to another BufferedTransformation
target | the destination BufferedTransformation |
copyMax | the number of bytes to copy |
channel | the channel on which the transfer should occur |
Definition at line 1680 of file cryptlib.h.
|
inline |
Copy bytes from this object using an index to another BufferedTransformation.
target | the destination BufferedTransformation |
position | the 0-based index of the byte stream to begin the copying |
copyMax | the number of bytes to copy |
channel | the channel on which the transfer should occur |
Definition at line 1693 of file cryptlib.h.
|
virtual |
Provides the number of bytes ready for retrieval.
Reimplemented in MessageQueue.
Definition at line 565 of file cryptlib.cpp.
|
virtual |
Provides the number of meesages processed by this object.
Reimplemented in Store, and MessageQueue.
Definition at line 573 of file cryptlib.cpp.
|
virtual |
Determines if any messages are available for retrieval.
NumberOfMessages() > 0
, false otherwise AnyMessages returns true if NumberOfMessages() > 0
Definition at line 581 of file cryptlib.cpp.
|
virtual |
Start retrieving the next message.
Reimplemented in Store, and MessageQueue.
Definition at line 589 of file cryptlib.cpp.
|
virtual |
Skip a number of meessages.
Definition at line 600 of file cryptlib.cpp.
|
inline |
Transfer messages from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
count | the number of messages to transfer |
channel | the channel on which the transfer should occur |
Definition at line 1741 of file cryptlib.h.
unsigned int BufferedTransformation::CopyMessagesTo | ( | BufferedTransformation & | target, |
unsigned int | count = UINT_MAX , |
||
const std::string & | channel = DEFAULT_CHANNEL |
||
) | const |
Copy messages from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
count | the number of messages to transfer |
channel | the channel on which the transfer should occur |
Definition at line 638 of file cryptlib.cpp.
|
inline |
Transfer all bytes from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
channel | the channel on which the transfer should occur |
Definition at line 1764 of file cryptlib.h.
void BufferedTransformation::CopyAllTo | ( | BufferedTransformation & | target, |
const std::string & | channel = DEFAULT_CHANNEL |
||
) | const |
Copy messages from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
channel | the channel on which the transfer should occur CopyAllTo copies messages from this object and copies them to the destination. |
Definition at line 689 of file cryptlib.cpp.
|
inlinevirtual |
Retrieve the next message in a series.
Definition at line 1776 of file cryptlib.h.
|
inlinevirtual |
Provides the number of messages in a series.
Reimplemented in MessageQueue.
Definition at line 1779 of file cryptlib.h.
|
inlinevirtual |
Provides the number of messages in a series.
Reimplemented in MessageQueue.
Definition at line 1782 of file cryptlib.h.
|
pure virtual |
Transfer bytes from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
byteCount | the number of bytes to transfer |
channel | the channel on which the transfer should occur |
blocking | specifies whether the object should block when processing input |
Implemented in Sink, ByteQueue::Walker, ByteQueue, MessageQueue, NullStore, RandomNumberStore, StringStore, Filter, FileStore, and BERGeneralDecoder.
|
pure virtual |
Copy bytes from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
begin | the 0-based index of the first byte to copy in the stream |
end | the 0-based index of the last byte to copy in the stream |
channel | the channel on which the transfer should occur |
blocking | specifies whether the object should block when processing input |
Implemented in Sink, ByteQueue::Walker, ByteQueue, MessageQueue, NullStore, RandomNumberStore, StringStore, Filter, FileStore, and BERGeneralDecoder.
size_t BufferedTransformation::TransferMessagesTo2 | ( | BufferedTransformation & | target, |
unsigned int & | messageCount, | ||
const std::string & | channel = DEFAULT_CHANNEL , |
||
bool | blocking = true |
||
) |
Transfer messages from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
messageCount | the number of messages to transfer |
channel | the channel on which the transfer should occur |
blocking | specifies whether the object should block when processing input |
Definition at line 608 of file cryptlib.cpp.
size_t BufferedTransformation::TransferAllTo2 | ( | BufferedTransformation & | target, |
const std::string & | channel = DEFAULT_CHANNEL , |
||
bool | blocking = true |
||
) |
Transfer all bytes from this object to another BufferedTransformation.
target | the destination BufferedTransformation |
channel | the channel on which the transfer should occur |
blocking | specifies whether the object should block when processing input |
Definition at line 657 of file cryptlib.cpp.
|
inline |
Input a byte for processing on a channel.
channel | the channel to process the data. |
inByte | the 8-bit byte (octet) to be processed. |
blocking | specifies whether the object should block when processing input. |
Definition at line 1865 of file cryptlib.h.
|
inline |
Input a byte buffer for processing on a channel.
channel | the channel to process the data |
inString | the byte buffer to process |
length | the size of the string, in bytes |
blocking | specifies whether the object should block when processing input |
Definition at line 1875 of file cryptlib.h.
|
inline |
Input multiple bytes that may be modified by callee on a channel.
channel | the channel to process the data. |
inString | the byte buffer to process |
length | the size of the string, in bytes |
blocking | specifies whether the object should block when processing input |
Definition at line 1885 of file cryptlib.h.
size_t BufferedTransformation::ChannelPutWord16 | ( | const std::string & | channel, |
word16 | value, | ||
ByteOrder | order = BIG_ENDIAN_ORDER , |
||
bool | blocking = true |
||
) |
Input a 16-bit word for processing on a channel.
channel | the channel to process the data. |
value | the 16-bit value to be processed. |
order | the ByteOrder in which the word should be processed. |
blocking | specifies whether the object should block when processing input. |
Definition at line 706 of file cryptlib.cpp.
size_t BufferedTransformation::ChannelPutWord32 | ( | const std::string & | channel, |
word32 | value, | ||
ByteOrder | order = BIG_ENDIAN_ORDER , |
||
bool | blocking = true |
||
) |
Input a 32-bit word for processing on a channel.
channel | the channel to process the data. |
value | the 32-bit value to be processed. |
order | the ByteOrder in which the word should be processed. |
blocking | specifies whether the object should block when processing input. |
Definition at line 712 of file cryptlib.cpp.
|
inline |
Signal the end of a message.
channel | the channel to process the data. |
propagation | the number of attached transformations the ChannelMessageEnd() signal should be passed |
blocking | specifies whether the object should block when processing input |
1
means this object only. Setting propagation to -1
means unlimited propagation. Definition at line 1914 of file cryptlib.h.
|
inline |
Input multiple bytes for processing and signal the end of a message.
channel | the channel to process the data. |
inString | the byte buffer to process |
length | the size of the string, in bytes |
propagation | the number of attached transformations the ChannelPutMessageEnd() signal should be passed |
blocking | specifies whether the object should block when processing input |
1
means this object only. Setting propagation to -1
means unlimited propagation. Definition at line 1926 of file cryptlib.h.
|
virtual |
Request space which can be written into by the caller.
channel | the channel to process the data |
size | the requested size of the buffer |
Reimplemented in OutputProxy, Redirector, AuthenticatedDecryptionFilter, AuthenticatedEncryptionFilter, and ChannelSwitch.
Definition at line 460 of file cryptlib.cpp.
|
virtual |
Input multiple bytes for processing on a channel.
channel | the channel to process the data. |
inString | the byte buffer to process. |
length | the size of the string, in bytes. |
messageEnd | means how many filters to signal MessageEnd() to, including this one. |
blocking | specifies whether the object should block when processing input. |
Reimplemented in EqualityComparisonFilter, RawIDA, OutputProxy, Redirector, AuthenticatedDecryptionFilter, AuthenticatedEncryptionFilter, and ChannelSwitch.
Definition at line 468 of file cryptlib.cpp.
|
virtual |
Input multiple bytes that may be modified by callee on a channel.
channel | the channel to process the data |
inString | the byte buffer to process |
length | the size of the string, in bytes |
messageEnd | means how many filters to signal MessageEnd() to, including this one |
blocking | specifies whether the object should block when processing input |
Reimplemented in OutputProxy, Redirector, and ChannelSwitch.
Definition at line 476 of file cryptlib.cpp.
|
virtual |
Flush buffered input and/or output on a channel.
channel | the channel to flush the data |
hardFlush | is used to indicate whether all data should be flushed |
propagation | the number of attached transformations the ChannelFlush() signal should be passed |
blocking | specifies whether the object should block when processing input |
1
means this object only. Setting propagation to -1
means unlimited propagation. Reimplemented in OutputProxy, Redirector, and ChannelSwitch.
Definition at line 484 of file cryptlib.cpp.
|
virtual |
Marks the end of a series of messages on a channel.
channel | the channel to signal the end of a series of messages |
propagation | the number of attached transformations the ChannelMessageSeriesEnd() signal should be passed |
blocking | specifies whether the object should block when processing input Each object that receives the signal will perform its processing, decrement propagation, and then pass the signal on to attached transformations if the value is not 0. propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation. |
Reimplemented in EqualityComparisonFilter, OutputProxy, Redirector, and ChannelSwitch.
Definition at line 492 of file cryptlib.cpp.
|
virtual |
Sets the default retrieval channel.
channel | the channel to signal the end of a series of messages |
Definition at line 700 of file cryptlib.cpp.
|
inlinevirtual |
Determines whether the object allows attachment.
Reimplemented in Filter.
Definition at line 1996 of file cryptlib.h.
|
inlinevirtual |
Returns the object immediately attached to this object.
Reimplemented in Filter.
Definition at line 2002 of file cryptlib.h.
|
inlinevirtual |
Returns the object immediately attached to this object.
Reimplemented in Filter.
Definition at line 2008 of file cryptlib.h.
|
inlinevirtual |
Delete the current attachment chain and attach a new one.
newAttachment | the new BufferedTransformation to attach |
NotImplemented | Detach delete the current attachment chain and replace it with an optional newAttachment If a derived class does not override Detach, then the base class throws NotImplemented. |
Reimplemented in Filter.
Definition at line 2017 of file cryptlib.h.
|
virtual |
Add newAttachment to the end of attachment chain.
newAttachment | the attachment to add to the end of the chain |
Definition at line 764 of file cryptlib.cpp.