Implementation of BufferedTransformation's attachment interface. More...
Public Member Functions | |
size_t | TransferTo2 (BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) |
size_t | CopyRangeTo2 (BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const |
BufferedTransformation & | Ref () |
Provides a reference to this object. | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. | |
virtual Clonable * | Clone () const |
Copies this object. | |
bool | Wait (unsigned long milliseconds, CallStack const &callStack) |
wait on this object | |
INPUT | |
size_t | Put (byte inByte, bool blocking=true) |
Input a byte for processing. | |
size_t | Put (const byte *inString, size_t length, bool blocking=true) |
Input a byte buffer for processing. | |
size_t | PutWord16 (word16 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 16-bit word for processing. | |
size_t | PutWord32 (word32 value, ByteOrder order=BIG_ENDIAN_ORDER, bool blocking=true) |
Input a 32-bit word for processing. | |
virtual byte * | CreatePutSpace (size_t &size) |
Request space which can be written into by the caller. | |
virtual bool | CanModifyInput () const |
Determines whether input can be modifed by the callee. | |
size_t | PutModifiable (byte *inString, size_t length, bool blocking=true) |
Input multiple bytes that may be modified by callee. | |
bool | MessageEnd (int propagation=-1, bool blocking=true) |
Signals the end of messages to the object. | |
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. | |
virtual size_t | Put2 (const byte *inString, size_t length, int messageEnd, bool blocking)=0 |
Input multiple bytes for processing. | |
virtual size_t | PutModifiable2 (byte *inString, size_t length, int messageEnd, bool blocking) |
Input multiple bytes that may be modified by callee. | |
WAITING | |
unsigned int | GetMaxWaitObjectCount () const |
Retrieves the maximum number of waitable objects. | |
void | GetWaitObjects (WaitObjectContainer &container, CallStack const &callStack) |
Retrieves waitable objects. | |
SIGNALS | |
virtual void | IsolatedInitialize (const NameValuePairs ¶meters) |
Initialize or reinitialize this object, without signal propagation. | |
virtual bool | IsolatedFlush (bool hardFlush, bool blocking)=0 |
Flushes data buffered by this object, without signal propagation. | |
virtual bool | IsolatedMessageSeriesEnd (bool blocking) |
Marks the end of a series of messages, without signal propagation. | |
virtual void | Initialize (const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1) |
Initialize or reinitialize this object, with signal propagation. | |
virtual bool | Flush (bool hardFlush, int propagation=-1, bool blocking=true) |
Flush buffered input and/or output, with signal propagation. | |
virtual bool | MessageSeriesEnd (int propagation=-1, bool blocking=true) |
Marks the end of a series of messages, with signal propagation. | |
virtual void | SetAutoSignalPropagation (int propagation) |
Set propagation of automatically generated and transferred signals. | |
virtual int | GetAutoSignalPropagation () const |
Retrieve automatic signal propagation value. | |
RETRIEVAL OF ONE MESSAGE | |
virtual lword | MaxRetrievable () const |
Provides the number of bytes ready for retrieval. | |
virtual bool | AnyRetrievable () const |
Determines whether bytes are ready for retrieval. | |
virtual size_t | Get (byte &outByte) |
Retrieve a 8-bit byte. | |
virtual size_t | Get (byte *outString, size_t getMax) |
Retrieve a block of bytes. | |
virtual size_t | Peek (byte &outByte) const |
Peek a 8-bit byte. | |
virtual size_t | Peek (byte *outString, size_t peekMax) const |
Peek a block of bytes. | |
size_t | GetWord16 (word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) |
Retrieve a 16-bit word. | |
size_t | GetWord32 (word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) |
Retrieve a 32-bit word. | |
size_t | PeekWord16 (word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) const |
Peek a 16-bit word. | |
size_t | PeekWord32 (word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) const |
Peek a 32-bit word. | |
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 | |
virtual lword | Skip (lword skipMax=LWORD_MAX) |
Discard skipMax bytes from the output buffer. | |
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 | |
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. | |
RETRIEVAL OF MULTIPLE MESSAGES | |
virtual lword | TotalBytesRetrievable () const |
Provides the number of bytes ready for retrieval. | |
virtual unsigned int | NumberOfMessages () const |
Provides the number of meesages processed by this object. | |
virtual bool | AnyMessages () const |
Determines if any messages are available for retrieval. | |
virtual bool | GetNextMessage () |
Start retrieving the next message. | |
virtual unsigned int | SkipMessages (unsigned int count=UINT_MAX) |
Skip a number of meessages. | |
unsigned int | TransferMessagesTo (BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=DEFAULT_CHANNEL) |
Transfer messages from this object to another BufferedTransformation. | |
unsigned int | CopyMessagesTo (BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=DEFAULT_CHANNEL) const |
Copies messages from this object to another BufferedTransformation. | |
virtual void | SkipAll () |
void | TransferAllTo (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL) |
void | CopyAllTo (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL) const |
virtual bool | GetNextMessageSeries () |
virtual unsigned int | NumberOfMessagesInThisSeries () const |
virtual unsigned int | NumberOfMessageSeries () const |
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. | |
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. | |
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. | |
size_t | TransferAllTo2 (BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) |
Transfer all bytes from this object to another BufferedTransformation. | |
CHANNELS | |
size_t | ChannelPut (const std::string &channel, byte inByte, bool blocking=true) |
Input a byte for processing on a channel. | |
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. | |
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. | |
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. | |
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. | |
bool | ChannelMessageEnd (const std::string &channel, int propagation=-1, bool blocking=true) |
Signal the end of a message. | |
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. | |
virtual byte * | ChannelCreatePutSpace (const std::string &channel, size_t &size) |
Request space which can be written into by the caller. | |
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. | |
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. | |
virtual bool | ChannelFlush (const std::string &channel, bool hardFlush, int propagation=-1, bool blocking=true) |
Flush buffered input and/or output on a channel. | |
virtual bool | ChannelMessageSeriesEnd (const std::string &channel, int propagation=-1, bool blocking=true) |
Marks the end of a series of messages on a channel. | |
virtual void | SetRetrievalChannel (const std::string &channel) |
Sets the default retrieval channel. | |
ATTACHMENT | |
virtual bool | Attachable () |
Determines whether the object allows attachment. | |
virtual BufferedTransformation * | AttachedTransformation () |
Returns the object immediately attached to this object. | |
virtual const BufferedTransformation * | AttachedTransformation () const |
Returns the object immediately attached to this object. | |
virtual void | Detach (BufferedTransformation *newAttachment=0) |
Delete the current attachment chain and attach a new one. | |
virtual void | Attach (BufferedTransformation *newAttachment) |
Add newAttachment to the end of attachment chain. | |
Static Public Attributes | |
static const std::string & | NULL_CHANNEL = DEFAULT_CHANNEL |
Implementation of BufferedTransformation's attachment interface.
Sink is a cornerstone of the Pipeline trinitiy. Data flows from Sources, through Filters, and then terminates in Sinks. The difference between a Source and Filter is a Source pumps data, while a Filter does not. The difference between a Filter and a Sink is a Filter allows an attached transformation, while a Sink does not.
A Sink doesnot produce any retrievable output.
See the discussion of BufferedTransformation in cryptlib.h for more details.
Definition at line 259 of file simple.h.
BufferedTransformation& BufferedTransformation::Ref | ( | ) | [inline, inherited] |
Provides a reference to this object.
Useful for passing a temporary object to a function that takes a non-const reference
Definition at line 1259 of file cryptlib.h.
size_t BufferedTransformation::Put | ( | byte | inByte, | |
bool | blocking = true | |||
) | [inline, inherited] |
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 1269 of file cryptlib.h.
References BufferedTransformation::Put().
Referenced by EqualityComparisonFilter::ChannelPut2(), X509PublicKey::DEREncode(), DEREncodeBitString(), DEREncodeOctetString(), DEREncodeUnsigned(), Integer::Encode(), BufferedTransformation::Put(), NetworkSink::Put2(), PK_DefaultDecryptionFilter::Put2(), and PK_DefaultEncryptionFilter::Put2().
size_t BufferedTransformation::Put | ( | const byte * | inString, | |
size_t | length, | |||
bool | blocking = true | |||
) | [inline, inherited] |
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 |
Internally, Put() calls Put2().
Definition at line 1278 of file cryptlib.h.
size_t BufferedTransformation::PutWord16 | ( | word16 | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER , |
|||
bool | blocking = true | |||
) | [inherited] |
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 717 of file cryptlib.cpp.
References BufferedTransformation::ChannelPutWord16().
Referenced by Integer::OpenPGPEncode().
size_t BufferedTransformation::PutWord32 | ( | word32 | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER , |
|||
bool | blocking = true | |||
) | [inherited] |
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 722 of file cryptlib.cpp.
References BufferedTransformation::ChannelPutWord32().
virtual byte* BufferedTransformation::CreatePutSpace | ( | size_t & | size | ) | [inline, virtual, inherited] |
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 MeterFilter, HashFilter, Redirector, OutputProxy, ArraySink, ArrayXorSink, and ByteQueue.
Definition at line 1304 of file cryptlib.h.
Referenced by AuthenticatedDecryptionFilter::ChannelCreatePutSpace(), AuthenticatedEncryptionFilter::ChannelCreatePutSpace(), BufferedTransformation::ChannelCreatePutSpace(), and ArrayXorSink::CreatePutSpace().
virtual bool BufferedTransformation::CanModifyInput | ( | ) | const [inline, virtual, inherited] |
Determines whether input can be modifed by the callee.
The base class implementation returns false.
Reimplemented in Redirector.
Definition at line 1310 of file cryptlib.h.
Referenced by Redirector::CanModifyInput().
size_t BufferedTransformation::PutModifiable | ( | byte * | inString, | |
size_t | length, | |||
bool | blocking = true | |||
) | [inline, inherited] |
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 1319 of file cryptlib.h.
bool BufferedTransformation::MessageEnd | ( | int | propagation = -1 , |
|
bool | blocking = true | |||
) | [inline, inherited] |
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 1327 of file cryptlib.h.
Referenced by EqualityComparisonFilter::ChannelPut2().
size_t BufferedTransformation::PutMessageEnd | ( | const byte * | inString, | |
size_t | length, | |||
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [inline, inherited] |
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 |
Internally, PutMessageEnd() calls Put2() with a modified propagation to ensure all attached transformations finish processing the message.
propagation count includes this object. Setting propagation to 1
means this object only. Setting propagation to -1
means unlimited propagation.
Definition at line 1339 of file cryptlib.h.
virtual size_t BufferedTransformation::Put2 | ( | const byte * | inString, | |
size_t | length, | |||
int | messageEnd, | |||
bool | blocking | |||
) | [pure virtual, inherited] |
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 BaseN_Encoder, BaseN_Decoder, Grouper, PK_DefaultEncryptionFilter, PK_DefaultDecryptionFilter, FileSink, MeterFilter, FilterWithBufferedInput, FilterWithInputQueue, HashFilter, SignerFilter, Redirector, OutputProxy, StringSinkTemplate< T >, RandomNumberSink, ArraySink, ArrayXorSink, SecretSharing, InformationDispersal, PaddingRemover, MessageQueue, NetworkSink, ByteQueue, MaurerRandomnessTest, BitBucket, FilterTester, Deflator, Inflator, InputRejecting< BufferedTransformation >, and InputRejecting< Filter >.
Referenced by BufferedTransformation::ChannelPut2().
virtual size_t BufferedTransformation::PutModifiable2 | ( | byte * | inString, | |
size_t | length, | |||
int | messageEnd, | |||
bool | blocking | |||
) | [inline, virtual, inherited] |
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 MeterFilter, FilterWithBufferedInput, and OutputProxy.
Definition at line 1356 of file cryptlib.h.
Referenced by BufferedTransformation::ChannelPutModifiable2().
void BufferedTransformation::GetWaitObjects | ( | WaitObjectContainer & | container, | |
CallStack const & | callStack | |||
) | [virtual, inherited] |
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 Redirector.
Definition at line 431 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::GetWaitObjects().
Referenced by BufferedTransformation::GetWaitObjects().
virtual void BufferedTransformation::IsolatedInitialize | ( | const NameValuePairs & | parameters | ) | [inline, virtual, inherited] |
Initialize or reinitialize this object, without signal propagation.
parameters | a set of NameValuePairs used 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.
Setting propagation to -1
means unlimited propagation.
If a derived class does not override IsolatedInitialize(), then the base class throws NotImplemented.
Reimplemented in Base32Encoder, Base32Decoder, Base64Encoder, Base64Decoder, Base64URLEncoder, Base64URLDecoder, BaseN_Encoder, BaseN_Decoder, Grouper, ChannelSwitch, FileSink, MeterFilter, FilterWithBufferedInput, HashFilter, AuthenticatedEncryptionFilter, SignerFilter, StringSinkTemplate< T >, RandomNumberSink, ArraySink, SourceTemplate< T >, HexEncoder, HexDecoder, RawIDA, SecretSharing, SecretRecovery, InformationDispersal, InformationRecovery, PaddingRemover, MessageQueue, ByteQueue, ByteQueue::Walker, Store, BitBucket, Deflator, Inflator, SourceTemplate< FileStore >, SourceTemplate< RandomNumberStore >, and SourceTemplate< StringStore >.
Definition at line 1394 of file cryptlib.h.
Referenced by Filter::Initialize(), and BufferedTransformation::Initialize().
virtual bool BufferedTransformation::IsolatedFlush | ( | bool | hardFlush, | |
bool | blocking | |||
) | [pure virtual, inherited] |
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 FileSink, FilterWithBufferedInput, ProxyFilter, MessageQueue, NonblockingSink, Deflator, and Inflator.
Referenced by Filter::Flush(), and BufferedTransformation::Flush().
virtual bool BufferedTransformation::IsolatedMessageSeriesEnd | ( | bool | blocking | ) | [inline, virtual, inherited] |
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 MeterFilter, and MessageQueue.
Definition at line 1408 of file cryptlib.h.
Referenced by Filter::MessageSeriesEnd(), and BufferedTransformation::MessageSeriesEnd().
void BufferedTransformation::Initialize | ( | const NameValuePairs & | parameters = g_nullNameValuePairs , |
|
int | propagation = -1 | |||
) | [virtual, inherited] |
Initialize or reinitialize this object, with signal propagation.
parameters | a set of NameValuePairs used to initialize or reinitialize this object and attached transformations | |
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 Filter, Redirector, and OutputProxy.
Definition at line 438 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::IsolatedInitialize().
Referenced by Redirector::Initialize().
bool BufferedTransformation::Flush | ( | bool | hardFlush, | |
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [virtual, inherited] |
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 Filter, Redirector, OutputProxy, SecretSharing, and InformationDispersal.
Definition at line 445 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::IsolatedFlush().
Referenced by BufferedTransformation::ChannelFlush().
bool BufferedTransformation::MessageSeriesEnd | ( | int | propagation = -1 , |
|
bool | blocking = true | |||
) | [virtual, inherited] |
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 Filter, Redirector, and OutputProxy.
Definition at line 452 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::IsolatedMessageSeriesEnd().
Referenced by EqualityComparisonFilter::ChannelMessageSeriesEnd(), and BufferedTransformation::ChannelMessageSeriesEnd().
virtual void BufferedTransformation::SetAutoSignalPropagation | ( | int | propagation | ) | [inline, virtual, inherited] |
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 1452 of file cryptlib.h.
lword BufferedTransformation::MaxRetrievable | ( | ) | const [virtual, inherited] |
Provides the number of bytes ready for retrieval.
All retrieval functions return the actual number of bytes retrieved, which is the lesser of the request number and MaxRetrievable()
Reimplemented in FileStore, RandomNumberStore, NullStore, MessageQueue, ByteQueue, and ByteQueue::Walker.
Definition at line 499 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::CopyTo(), and BufferedTransformation::MaxRetrievable().
Referenced by RandomNumberStore::AnyRetrievable(), Integer::BERDecode(), Integer::Decode(), BufferedTransformation::MaxRetrievable(), Integer::OpenPGPDecode(), and BufferedTransformation::TotalBytesRetrievable().
bool BufferedTransformation::AnyRetrievable | ( | ) | const [virtual, inherited] |
Determines whether bytes are ready for retrieval.
Reimplemented in RandomNumberStore, MessageQueue, and ByteQueue.
Definition at line 507 of file cryptlib.cpp.
References BufferedTransformation::AnyRetrievable(), BufferedTransformation::AttachedTransformation(), and BufferedTransformation::Peek().
Referenced by BufferedTransformation::AnyRetrievable(), Store::GetNextMessage(), and BufferedTransformation::TransferMessagesTo2().
size_t BufferedTransformation::Get | ( | byte & | outByte | ) | [virtual, inherited] |
Retrieve a 8-bit byte.
outByte | the 8-bit value to be retrieved |
Use the return value of Get to detect short reads.
Reimplemented in ByteQueue, and ByteQueue::Walker.
Definition at line 518 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::Get().
Referenced by BERDecodeUnsigned(), Integer::Decode(), and BufferedTransformation::Get().
size_t BufferedTransformation::Get | ( | byte * | outString, | |
size_t | getMax | |||
) | [virtual, inherited] |
Retrieve a block of bytes.
outString | a block of bytes | |
getMax | the number of bytes to Get |
Use the return value of Get to detect short reads.
Reimplemented in ByteQueue, and ByteQueue::Walker.
Definition at line 526 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::Get(), and BufferedTransformation::TransferTo().
size_t BufferedTransformation::Peek | ( | byte & | outByte | ) | const [virtual, inherited] |
Peek a 8-bit byte.
outByte | the 8-bit value to be retrieved |
Peek does not remove bytes from the object. Use the return value of Get to detect short reads.
Reimplemented in ByteQueue, and ByteQueue::Walker.
Definition at line 537 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::Peek().
Referenced by BufferedTransformation::AnyRetrievable(), Integer::Decode(), BufferedTransformation::Peek(), BufferedTransformation::PeekWord16(), and BufferedTransformation::PeekWord32().
size_t BufferedTransformation::Peek | ( | byte * | outString, | |
size_t | peekMax | |||
) | const [virtual, inherited] |
Peek a block of bytes.
outString | a block of bytes | |
peekMax | the number of bytes to Peek |
Peek does not remove bytes from the object. Use the return value of Get to detect short reads.
Reimplemented in ByteQueue, and ByteQueue::Walker.
Definition at line 545 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::CopyTo(), and BufferedTransformation::Peek().
size_t BufferedTransformation::GetWord16 | ( | word16 & | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER | |||
) | [inherited] |
Retrieve a 16-bit word.
value | the 16-bit value to be retrieved | |
order | the ByteOrder in which the word should be retrieved |
Use the return value of GetWord16 to detect short reads.
Definition at line 753 of file cryptlib.cpp.
References BufferedTransformation::PeekWord16(), and BufferedTransformation::Skip().
Referenced by Integer::OpenPGPDecode().
size_t BufferedTransformation::GetWord32 | ( | word32 & | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER | |||
) | [inherited] |
Retrieve a 32-bit word.
value | the 32-bit value to be retrieved | |
order | the ByteOrder in which the word should be retrieved |
Use the return value of GetWord16 to detect short reads.
Definition at line 758 of file cryptlib.cpp.
References BufferedTransformation::PeekWord32(), and BufferedTransformation::Skip().
size_t BufferedTransformation::PeekWord16 | ( | word16 & | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER | |||
) | const [inherited] |
Peek a 16-bit word.
value | the 16-bit value to be retrieved | |
order | the ByteOrder in which the word should be retrieved |
Peek does not consume bytes in the stream. Use the return value of GetWord16 to detect short reads.
Definition at line 727 of file cryptlib.cpp.
References BufferedTransformation::Peek().
Referenced by BufferedTransformation::GetWord16().
size_t BufferedTransformation::PeekWord32 | ( | word32 & | value, | |
ByteOrder | order = BIG_ENDIAN_ORDER | |||
) | const [inherited] |
Peek a 32-bit word.
value | the 32-bit value to be retrieved | |
order | the ByteOrder in which the word should be retrieved |
Peek does not consume bytes in the stream. Use the return value of GetWord16 to detect short reads.
Definition at line 740 of file cryptlib.cpp.
References BufferedTransformation::Peek().
Referenced by BufferedTransformation::GetWord32().
lword BufferedTransformation::TransferTo | ( | BufferedTransformation & | target, | |
lword | transferMax = LWORD_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL | |||
) | [inline, inherited] |
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 |
TransferTo removes bytes from this object and moves them to the destination.
The function always returns transferMax. If an accurate count is needed, then use TransferTo2.
Definition at line 1544 of file cryptlib.h.
Referenced by ByteQueue::Walker::Get(), ByteQueue::Get(), BufferedTransformation::Get(), IntegrityCheckModule(), and BufferedTransformation::Skip().
lword BufferedTransformation::Skip | ( | lword | skipMax = LWORD_MAX |
) | [virtual, inherited] |
Discard skipMax bytes from the output buffer.
skipMax | the number of bytes to discard |
Skip always returns skipMax.
Reimplemented in FileStore.
Definition at line 556 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::Skip(), and BufferedTransformation::TransferTo().
Referenced by Integer::Decode(), BufferedTransformation::GetWord16(), BufferedTransformation::GetWord32(), and BufferedTransformation::Skip().
lword BufferedTransformation::CopyTo | ( | BufferedTransformation & | target, | |
lword | copyMax = LWORD_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL | |||
) | const [inline, inherited] |
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 |
CopyTo copies bytes from this object to the destination. The bytes are not removed from this object.
The function always returns copyMax. If an accurate count is needed, then use CopyRangeTo2.
Definition at line 1561 of file cryptlib.h.
Referenced by PKCS8PrivateKey::DEREncodeOptionalAttributes(), BufferedTransformation::MaxRetrievable(), ByteQueue::Walker::Peek(), ByteQueue::Peek(), and BufferedTransformation::Peek().
lword BufferedTransformation::CopyRangeTo | ( | BufferedTransformation & | target, | |
lword | position, | |||
lword | copyMax = LWORD_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL | |||
) | const [inline, inherited] |
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 |
CopyTo copies bytes from this object to the destination. The bytes remain in this object. Copying begins at the index position in the current stream, and not from an absolute position in the stream.
The function returns the new position in the stream after transferring the bytes starting at the index.
Definition at line 1574 of file cryptlib.h.
lword BufferedTransformation::TotalBytesRetrievable | ( | ) | const [virtual, inherited] |
Provides the number of bytes ready for retrieval.
Reimplemented in MessageQueue.
Definition at line 564 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::MaxRetrievable(), and BufferedTransformation::TotalBytesRetrievable().
Referenced by BufferedTransformation::TotalBytesRetrievable().
unsigned int BufferedTransformation::NumberOfMessages | ( | ) | const [virtual, inherited] |
Provides the number of meesages processed by this object.
NumberOfMessages returns number of times MessageEnd() has been received minus messages retrieved or skipped
Reimplemented in MessageQueue, and Store.
Definition at line 572 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::CopyMessagesTo(), and BufferedTransformation::NumberOfMessages().
Referenced by BufferedTransformation::AnyMessages(), and BufferedTransformation::NumberOfMessages().
bool BufferedTransformation::AnyMessages | ( | ) | const [virtual, inherited] |
Determines if any messages are available for retrieval.
NumberOfMessages() > 0
, false otherwiseAnyMessages returns true if NumberOfMessages() > 0
Definition at line 580 of file cryptlib.cpp.
References BufferedTransformation::AnyMessages(), BufferedTransformation::AttachedTransformation(), and BufferedTransformation::NumberOfMessages().
Referenced by BufferedTransformation::AnyMessages(), BufferedTransformation::GetNextMessage(), and BufferedTransformation::TransferMessagesTo2().
bool BufferedTransformation::GetNextMessage | ( | ) | [virtual, inherited] |
Start retrieving the next message.
GetNextMessage() returns true if a message is ready for retrieval; false if no more messages exist or this message is not completely retrieved.
Reimplemented in MessageQueue, and Store.
Definition at line 588 of file cryptlib.cpp.
References BufferedTransformation::AnyMessages(), BufferedTransformation::AttachedTransformation(), and BufferedTransformation::GetNextMessage().
Referenced by BufferedTransformation::GetNextMessage(), and BufferedTransformation::TransferMessagesTo2().
unsigned int BufferedTransformation::SkipMessages | ( | unsigned int | count = UINT_MAX |
) | [virtual, inherited] |
Skip a number of meessages.
SkipMessages() skips count number of messages. If there is an AttachedTransformation() then SkipMessages() is called on the attached transformation. If there is no attached transformation, then count number of messages are sent to TheBitBucket() using TransferMessagesTo().
Definition at line 599 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::SkipMessages(), and BufferedTransformation::TransferMessagesTo().
Referenced by BufferedTransformation::SkipMessages().
unsigned int BufferedTransformation::TransferMessagesTo | ( | BufferedTransformation & | target, | |
unsigned int | count = UINT_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL | |||
) | [inline, inherited] |
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 |
TransferMessagesTo2 removes messages from this object and moves them to the destination. If all bytes are not transferred for a message, then processing stops and the number of remaining bytes is returned. TransferMessagesTo() does not proceed to the next message.
A return value of 0 indicates all messages were successfully transferred.
Definition at line 1622 of file cryptlib.h.
Referenced by BufferedTransformation::SkipMessages().
unsigned int BufferedTransformation::CopyMessagesTo | ( | BufferedTransformation & | target, | |
unsigned int | count = UINT_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL | |||
) | const [inherited] |
Copies 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 |
CopyMessagesTo copies messages from this object and copies them to the destination. If all bytes are not transferred for a message, then processing stops and the number of remaining bytes is returned. CopyMessagesTo() does not proceed to the next message.
A return value of 0 indicates all messages were successfully copied.
Definition at line 637 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::CopyMessagesTo().
Referenced by BufferedTransformation::CopyMessagesTo(), and BufferedTransformation::NumberOfMessages().
virtual size_t BufferedTransformation::TransferTo2 | ( | BufferedTransformation & | target, | |
lword & | byteCount, | |||
const std::string & | channel = DEFAULT_CHANNEL , |
|||
bool | blocking = true | |||
) | [pure virtual, inherited] |
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 |
TransferTo removes bytes from this object and moves them to the destination. Transfer begins at the index position in the current stream, and not from an absolute position in the stream.
byteCount is an IN and OUT parameter. When the call is made, byteCount is the requested size of the transfer. When the call returns, byteCount is the number of bytes that were transferred.
Referenced by BufferedTransformation::TransferAllTo2(), and BufferedTransformation::TransferMessagesTo2().
virtual size_t BufferedTransformation::CopyRangeTo2 | ( | BufferedTransformation & | target, | |
lword & | begin, | |||
lword | end = LWORD_MAX , |
|||
const std::string & | channel = DEFAULT_CHANNEL , |
|||
bool | blocking = true | |||
) | const [pure virtual, inherited] |
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 |
CopyRangeTo2 copies bytes from this object to the destination. The bytes are not removed from this object. Copying begins at the index position in the current stream, and not from an absolute position in the stream.
begin is an IN and OUT parameter. When the call is made, begin is the starting position of the copy. When the call returns, begin is the position of the first byte that was not copied (which may be different tahn end). begin can be used for subsequent calls to CopyRangeTo2.
size_t BufferedTransformation::TransferMessagesTo2 | ( | BufferedTransformation & | target, | |
unsigned int & | messageCount, | |||
const std::string & | channel = DEFAULT_CHANNEL , |
|||
bool | blocking = true | |||
) | [inherited] |
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 |
TransferMessagesTo2 removes messages from this object and moves them to the destination.
Definition at line 607 of file cryptlib.cpp.
References BufferedTransformation::AnyMessages(), BufferedTransformation::AnyRetrievable(), BufferedTransformation::AttachedTransformation(), BufferedTransformation::ChannelMessageEnd(), BufferedTransformation::GetAutoSignalPropagation(), BufferedTransformation::GetNextMessage(), BufferedTransformation::TransferMessagesTo2(), and BufferedTransformation::TransferTo2().
Referenced by BufferedTransformation::TransferAllTo2(), and BufferedTransformation::TransferMessagesTo2().
size_t BufferedTransformation::TransferAllTo2 | ( | BufferedTransformation & | target, | |
const std::string & | channel = DEFAULT_CHANNEL , |
|||
bool | blocking = true | |||
) | [inherited] |
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 |
TransferMessagesTo2 removes messages from this object and moves them to the destination.
Definition at line 656 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), BufferedTransformation::TransferAllTo2(), BufferedTransformation::TransferMessagesTo2(), and BufferedTransformation::TransferTo2().
Referenced by BufferedTransformation::TransferAllTo2().
size_t BufferedTransformation::ChannelPut | ( | const std::string & | channel, | |
byte | inByte, | |||
bool | blocking = true | |||
) | [inline, inherited] |
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 1726 of file cryptlib.h.
References BufferedTransformation::ChannelPut().
Referenced by BufferedTransformation::ChannelPut(), BufferedTransformation::ChannelPutWord16(), BufferedTransformation::ChannelPutWord32(), X917RNG::GenerateIntoBufferedTransformation(), RandomPool::GenerateIntoBufferedTransformation(), and RandomNumberGenerator::GenerateIntoBufferedTransformation().
size_t BufferedTransformation::ChannelPut | ( | const std::string & | channel, | |
const byte * | inString, | |||
size_t | length, | |||
bool | blocking = true | |||
) | [inline, inherited] |
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 1736 of file cryptlib.h.
size_t BufferedTransformation::ChannelPutModifiable | ( | const std::string & | channel, | |
byte * | inString, | |||
size_t | length, | |||
bool | blocking = true | |||
) | [inline, inherited] |
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 1746 of file cryptlib.h.
size_t BufferedTransformation::ChannelPutWord16 | ( | const std::string & | channel, | |
word16 | value, | |||
ByteOrder | order = BIG_ENDIAN_ORDER , |
|||
bool | blocking = true | |||
) | [inherited] |
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 705 of file cryptlib.cpp.
References BufferedTransformation::ChannelPut().
Referenced by BufferedTransformation::PutWord16().
size_t BufferedTransformation::ChannelPutWord32 | ( | const std::string & | channel, | |
word32 | value, | |||
ByteOrder | order = BIG_ENDIAN_ORDER , |
|||
bool | blocking = true | |||
) | [inherited] |
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 711 of file cryptlib.cpp.
References BufferedTransformation::ChannelPut().
Referenced by BufferedTransformation::PutWord32().
bool BufferedTransformation::ChannelMessageEnd | ( | const std::string & | channel, | |
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [inline, inherited] |
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 |
propagation count includes this object. Setting propagation to 1
means this object only. Setting propagation to -1
means unlimited propagation.
Definition at line 1775 of file cryptlib.h.
Referenced by BufferedTransformation::TransferMessagesTo2().
size_t BufferedTransformation::ChannelPutMessageEnd | ( | const std::string & | channel, | |
const byte * | inString, | |||
size_t | length, | |||
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [inline, inherited] |
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 |
propagation count includes this object. Setting propagation to 1
means this object only. Setting propagation to -1
means unlimited propagation.
Definition at line 1788 of file cryptlib.h.
byte * BufferedTransformation::ChannelCreatePutSpace | ( | const std::string & | channel, | |
size_t & | size | |||
) | [virtual, inherited] |
Request space which can be written into by the caller.
channel | the channel to process the data | |
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 ChannelSwitch, AuthenticatedEncryptionFilter, AuthenticatedDecryptionFilter, Redirector, and OutputProxy.
Definition at line 459 of file cryptlib.cpp.
References Algorithm::AlgorithmName(), and BufferedTransformation::CreatePutSpace().
Referenced by ChannelSwitch::ChannelCreatePutSpace().
size_t BufferedTransformation::ChannelPut2 | ( | const std::string & | channel, | |
const byte * | inString, | |||
size_t | length, | |||
int | messageEnd, | |||
bool | blocking | |||
) | [virtual, inherited] |
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 ChannelSwitch, AuthenticatedEncryptionFilter, AuthenticatedDecryptionFilter, Redirector, OutputProxy, RawIDA, and EqualityComparisonFilter.
Definition at line 467 of file cryptlib.cpp.
References Algorithm::AlgorithmName(), and BufferedTransformation::Put2().
Referenced by ChannelSwitch::ChannelPut2(), and BufferedTransformation::ChannelPutModifiable2().
size_t BufferedTransformation::ChannelPutModifiable2 | ( | const std::string & | channel, | |
byte * | inString, | |||
size_t | length, | |||
int | messageEnd, | |||
bool | blocking | |||
) | [virtual, inherited] |
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 ChannelSwitch, Redirector, and OutputProxy.
Definition at line 475 of file cryptlib.cpp.
References BufferedTransformation::ChannelPut2(), and BufferedTransformation::PutModifiable2().
Referenced by ChannelSwitch::ChannelPutModifiable2().
bool BufferedTransformation::ChannelFlush | ( | const std::string & | channel, | |
bool | hardFlush, | |||
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [virtual, inherited] |
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 |
propagation count includes this object. Setting propagation to 1
means this object only. Setting propagation to -1
means unlimited propagation.
Reimplemented in ChannelSwitch, Redirector, and OutputProxy.
Definition at line 483 of file cryptlib.cpp.
References Algorithm::AlgorithmName(), and BufferedTransformation::Flush().
Referenced by ChannelSwitch::ChannelFlush().
bool BufferedTransformation::ChannelMessageSeriesEnd | ( | const std::string & | channel, | |
int | propagation = -1 , |
|||
bool | blocking = true | |||
) | [virtual, inherited] |
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 ChannelSwitch, Redirector, OutputProxy, and EqualityComparisonFilter.
Definition at line 491 of file cryptlib.cpp.
References Algorithm::AlgorithmName(), and BufferedTransformation::MessageSeriesEnd().
Referenced by ChannelSwitch::ChannelMessageSeriesEnd().
void BufferedTransformation::SetRetrievalChannel | ( | const std::string & | channel | ) | [virtual, inherited] |
Sets the default retrieval channel.
channel | the channel to signal the end of a series of messages |
Definition at line 699 of file cryptlib.cpp.
References BufferedTransformation::AttachedTransformation(), and BufferedTransformation::SetRetrievalChannel().
Referenced by BufferedTransformation::SetRetrievalChannel().
virtual bool BufferedTransformation::Attachable | ( | ) | [inline, virtual, inherited] |
Determines whether the object allows 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.
Sources and Filters will return true, while Sinks and other objects will return false.
Reimplemented in Filter.
Definition at line 1856 of file cryptlib.h.
Referenced by BufferedTransformation::Attach().
virtual BufferedTransformation* BufferedTransformation::AttachedTransformation | ( | ) | [inline, virtual, inherited] |
Returns the object immediately attached to this object.
AttachedTransformation returns NULL if there is no attachment
Reimplemented in Filter.
Definition at line 1860 of file cryptlib.h.
Referenced by BufferedTransformation::AnyMessages(), BufferedTransformation::AnyRetrievable(), BufferedTransformation::Attach(), BufferedTransformation::CopyMessagesTo(), BufferedTransformation::Flush(), BufferedTransformation::Get(), BufferedTransformation::GetMaxWaitObjectCount(), BufferedTransformation::GetNextMessage(), BufferedTransformation::GetWaitObjects(), BufferedTransformation::Initialize(), BufferedTransformation::MaxRetrievable(), BufferedTransformation::MessageSeriesEnd(), BufferedTransformation::NumberOfMessages(), BufferedTransformation::Peek(), BufferedTransformation::SetRetrievalChannel(), BufferedTransformation::Skip(), BufferedTransformation::SkipMessages(), BufferedTransformation::TotalBytesRetrievable(), BufferedTransformation::TransferAllTo2(), and BufferedTransformation::TransferMessagesTo2().
virtual const BufferedTransformation* BufferedTransformation::AttachedTransformation | ( | ) | const [inline, virtual, inherited] |
Returns the object immediately attached to this object.
AttachedTransformation returns NULL if there is no attachment
Reimplemented in Filter.
Definition at line 1864 of file cryptlib.h.
References BufferedTransformation::AttachedTransformation().
Referenced by BufferedTransformation::AttachedTransformation().
virtual void BufferedTransformation::Detach | ( | BufferedTransformation * | newAttachment = 0 |
) | [inline, virtual, inherited] |
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.
Definition at line 1873 of file cryptlib.h.
Referenced by BufferedTransformation::Attach().
void BufferedTransformation::Attach | ( | BufferedTransformation * | newAttachment | ) | [virtual, inherited] |
Add newAttachment to the end of attachment chain.
newAttachment | the attachment to add to the end of the chain |
Definition at line 763 of file cryptlib.cpp.
References BufferedTransformation::Attach(), BufferedTransformation::Attachable(), BufferedTransformation::AttachedTransformation(), and BufferedTransformation::Detach().
Referenced by BufferedTransformation::Attach().
virtual std::string Algorithm::AlgorithmName | ( | ) | const [inline, virtual, inherited] |
Provides the name of this algorithm.
The standard algorithm name can be a name like AES or AES/GCM. Some algorithms do not have standard names yet. For example, there is no standard algorithm name for Shoup's ECIES.
Reimplemented in Adler32, CCM_Base, CRC32, ClassNullRNG, AuthenticatedSymmetricCipher, DH_Domain< GROUP_PARAMETERS, COFACTOR_OPTION >, EAX_Base, StreamTransformationFilter, HashFilter, HashVerificationFilter, AuthenticatedDecryptionFilter, SignerFilter, SignatureVerificationFilter, GCM_Base, HMAC< T >, RDRAND, RDSEED, SHA3, BitBucket, and VMAC_Base.
Definition at line 488 of file cryptlib.h.
Referenced by BufferedTransformation::ChannelCreatePutSpace(), BufferedTransformation::ChannelFlush(), BufferedTransformation::ChannelMessageSeriesEnd(), BufferedTransformation::ChannelPut2(), TF_DecryptorBase::Decrypt(), TF_EncryptorBase::Encrypt(), StreamTransformation::ProcessLastBlock(), and PK_DefaultDecryptionFilter::Put2().
virtual Clonable* Clonable::Clone | ( | ) | const [inline, virtual, inherited] |
Copies this object.
NotImplemented |
Definition at line 464 of file cryptlib.h.
bool Waitable::Wait | ( | unsigned long | milliseconds, | |
CallStack const & | callStack | |||
) | [inherited] |
wait on this object
same as creating an empty container, calling GetWaitObjects(), and calling Wait() on the container
Definition at line 426 of file wait.cpp.
References Waitable::GetWaitObjects().