Whitespace check-in

pull/398/head
Jeffrey Walton 2017-03-17 18:31:40 -04:00
parent c90a63196a
commit bed31de2f6
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 75 additions and 75 deletions

View File

@ -698,8 +698,8 @@ protected:
//! \brief Validates the IV //! \brief Validates the IV
//! \param iv the IV with a length of IVSize, in bytes //! \param iv the IV with a length of IVSize, in bytes
//! \throws InvalidArgument on failure //! \throws InvalidArgument on failure
//! \details Internally, the default implementation checks the iv. If iv is not NULLPTR, //! \details Internally, the default implementation checks the iv. If iv is not NULL or nullptr,
//! then the function succeeds. If iv is NULLPTR, then IVRequirement is checked against //! then the function succeeds. If iv is NULL, then IVRequirement is checked against
//! UNPREDICTABLE_RANDOM_IV. If IVRequirement is UNPREDICTABLE_RANDOM_IV, then //! UNPREDICTABLE_RANDOM_IV. If IVRequirement is UNPREDICTABLE_RANDOM_IV, then
//! then the function succeeds. Otherwise, an exception is thrown. //! then the function succeeds. Otherwise, an exception is thrown.
void ThrowIfInvalidIV(const byte *iv); void ThrowIfInvalidIV(const byte *iv);
@ -944,7 +944,7 @@ public:
//! \details size is an \a IN and \a OUT parameter and used as a hint. When the call is made, //! \details size is an \a IN and \a 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 //! size is the requested size of the buffer. When the call returns, size is the size of
//! the array returned to the caller. //! the array returned to the caller.
//! \details The base class implementation sets size to 0 and returns NULL. //! \details The base class implementation sets size to 0 and returns NULL or nullptr.
//! \note Some objects, like ArraySink, cannot create a space because its fixed. //! \note Some objects, like ArraySink, cannot create a space because its fixed.
virtual byte * CreateUpdateSpace(size_t &size) {size=0; return NULLPTR;} virtual byte * CreateUpdateSpace(size_t &size) {size=0; return NULLPTR;}
@ -1286,8 +1286,8 @@ public:
//! \brief Retrieves waitable objects //! \brief Retrieves waitable objects
//! \param container the wait container to receive the references to the objects. //! \param container the wait container to receive the references to the objects.
//! \param callStack CallStack object used to select waitable objects //! \param callStack CallStack() object used to select waitable objects
//! \details GetWaitObjects is usually called in one of two ways. First, it can //! \details GetWaitObjects() is usually called in one of two ways. First, it can
//! be called like <tt>something.GetWaitObjects(c, CallStack("my func after X", 0));</tt>. //! be called like <tt>something.GetWaitObjects(c, CallStack("my func after X", 0));</tt>.
//! Second, if in an outer GetWaitObjects() method that itself takes a callStack //! Second, if in an outer GetWaitObjects() method that itself takes a callStack
//! parameter, it can be called like //! parameter, it can be called like
@ -1458,7 +1458,7 @@ public:
//! \brief Retrieves waitable objects //! \brief Retrieves waitable objects
//! \param container the wait container to receive the references to the objects //! \param container the wait container to receive the references to the objects
//! \param callStack CallStack object used to select waitable objects //! \param callStack CallStack() object used to select waitable objects
//! \details GetWaitObjects is usually called in one of two ways. First, it can //! \details GetWaitObjects is usually called in one of two ways. First, it can
//! be called like <tt>something.GetWaitObjects(c, CallStack("my func after X", 0));</tt>. //! be called like <tt>something.GetWaitObjects(c, CallStack("my func after X", 0));</tt>.
//! Second, if in an outer GetWaitObjects() method that itself takes a callStack //! Second, if in an outer GetWaitObjects() method that itself takes a callStack
@ -1576,7 +1576,7 @@ public:
//! \param outByte the 8-bit value to be retrieved //! \param outByte the 8-bit value to be retrieved
//! \return the number of bytes read during the call. //! \return the number of bytes read during the call.
//! \details Peek does not remove bytes from the object. Use the return value of //! \details Peek does not remove bytes from the object. Use the return value of
//! Get to detect short reads. //! Get() to detect short reads.
virtual size_t Peek(byte &outByte) const; virtual size_t Peek(byte &outByte) const;
//! \brief Peek a block of bytes //! \brief Peek a block of bytes
@ -1584,21 +1584,21 @@ public:
//! \param peekMax the number of bytes to Peek //! \param peekMax the number of bytes to Peek
//! \return the number of bytes read during the call. //! \return the number of bytes read during the call.
//! \details Peek does not remove bytes from the object. Use the return value of //! \details Peek does not remove bytes from the object. Use the return value of
//! Get to detect short reads. //! Get() to detect short reads.
virtual size_t Peek(byte *outString, size_t peekMax) const; virtual size_t Peek(byte *outString, size_t peekMax) const;
//! \brief Retrieve a 16-bit word //! \brief Retrieve a 16-bit word
//! \param value the 16-bit value to be retrieved //! \param value the 16-bit value to be retrieved
//! \param order the ByteOrder of the value to be processed. //! \param order the ByteOrder of the value to be processed.
//! \return the number of bytes consumed during the call. //! \return the number of bytes consumed during the call.
//! \details Use the return value of GetWord16 to detect short reads. //! \details Use the return value of GetWord16() to detect short reads.
size_t GetWord16(word16 &value, ByteOrder order=BIG_ENDIAN_ORDER); size_t GetWord16(word16 &value, ByteOrder order=BIG_ENDIAN_ORDER);
//! \brief Retrieve a 32-bit word //! \brief Retrieve a 32-bit word
//! \param value the 32-bit value to be retrieved //! \param value the 32-bit value to be retrieved
//! \param order the ByteOrder of the value to be processed. //! \param order the ByteOrder of the value to be processed.
//! \return the number of bytes consumed during the call. //! \return the number of bytes consumed during the call.
//! \details Use the return value of GetWord16 to detect short reads. //! \details Use the return value of GetWord16() to detect short reads.
size_t GetWord32(word32 &value, ByteOrder order=BIG_ENDIAN_ORDER); size_t GetWord32(word32 &value, ByteOrder order=BIG_ENDIAN_ORDER);
//! \brief Peek a 16-bit word //! \brief Peek a 16-bit word
@ -1606,7 +1606,7 @@ public:
//! \param order the ByteOrder of the value to be processed. //! \param order the ByteOrder of the value to be processed.
//! \return the number of bytes consumed during the call. //! \return the number of bytes consumed during the call.
//! \details Peek does not consume bytes in the stream. Use the return value //! \details Peek does not consume bytes in the stream. Use the return value
//! of GetWord16 to detect short reads. //! of GetWord16() to detect short reads.
size_t PeekWord16(word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) const; size_t PeekWord16(word16 &value, ByteOrder order=BIG_ENDIAN_ORDER) const;
//! \brief Peek a 32-bit word //! \brief Peek a 32-bit word
@ -1614,7 +1614,7 @@ public:
//! \param order the ByteOrder of the value to be processed. //! \param order the ByteOrder of the value to be processed.
//! \return the number of bytes consumed during the call. //! \return the number of bytes consumed during the call.
//! \details Peek does not consume bytes in the stream. Use the return value //! \details Peek does not consume bytes in the stream. Use the return value
//! of GetWord16 to detect short reads. //! of GetWord16() to detect short reads.
size_t PeekWord32(word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) const; size_t PeekWord32(word32 &value, ByteOrder order=BIG_ENDIAN_ORDER) const;
//! move transferMax bytes of the buffered output to target as input //! move transferMax bytes of the buffered output to target as input
@ -1625,7 +1625,7 @@ public:
//! \param channel the channel on which the transfer should occur //! \param channel the channel on which the transfer should occur
//! \return the number of bytes transferred during the call. //! \return the number of bytes transferred during the call.
//! \details TransferTo removes bytes from this object and moves them to the destination. //! \details TransferTo removes bytes from this object and moves them to the destination.
//! \details The function always returns transferMax. If an accurate count is needed, then use TransferTo2. //! \details The function always returns transferMax. If an accurate count is needed, then use TransferTo2().
lword TransferTo(BufferedTransformation &target, lword transferMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) lword TransferTo(BufferedTransformation &target, lword transferMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL)
{TransferTo2(target, transferMax, channel); return transferMax;} {TransferTo2(target, transferMax, channel); return transferMax;}
@ -1650,7 +1650,7 @@ public:
//! \param channel the channel on which the transfer should occur //! \param channel the channel on which the transfer should occur
//! \return the number of bytes copied during the call. //! \return the number of bytes copied during the call.
//! \details CopyTo copies bytes from this object to the destination. The bytes are not removed from this object. //! \details CopyTo copies bytes from this object to the destination. The bytes are not removed from this object.
//! \details The function always returns copyMax. If an accurate count is needed, then use CopyRangeTo2. //! \details The function always returns copyMax. If an accurate count is needed, then use CopyRangeTo2().
lword CopyTo(BufferedTransformation &target, lword copyMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) const lword CopyTo(BufferedTransformation &target, lword copyMax=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL) const
{return CopyRangeTo(target, 0, copyMax, channel);} {return CopyRangeTo(target, 0, copyMax, channel);}
@ -1787,8 +1787,8 @@ public:
//! not from an absolute position in the stream. //! not from an absolute position in the stream.
//! \details begin is an \a IN and \a OUT parameter. When the call is made, begin is the //! \details begin is an \a IN and \a 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 //! starting position of the copy. When the call returns, begin is the position of the first
//! byte that was \a not copied (which may be different tahn end). begin can be used for //! byte that was \a not copied (which may be different than end). begin can be used for
//! subsequent calls to CopyRangeTo2. //! subsequent calls to CopyRangeTo2().
virtual size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const =0; virtual size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const =0;
// upon return, messageCount contains number of messages that have finished being transferred, // upon return, messageCount contains number of messages that have finished being transferred,
@ -1981,8 +1981,8 @@ public:
//! \brief Delete the current attachment chain and attach a new one //! \brief Delete the current attachment chain and attach a new one
//! \param newAttachment the new BufferedTransformation to attach //! \param newAttachment the new BufferedTransformation to attach
//! \throws NotImplemented //! \throws NotImplemented
//! \details Detach delete the current attachment chain and replace it with an optional newAttachment //! \details Detach() deletes the current attachment chain and replace it with an optional newAttachment
//! \details If a derived class does not override Detach, then the base class throws //! \details If a derived class does not override Detach(), then the base class throws
//! NotImplemented. //! NotImplemented.
virtual void Detach(BufferedTransformation *newAttachment = NULLPTR) { virtual void Detach(BufferedTransformation *newAttachment = NULLPTR) {
CRYPTOPP_UNUSED(newAttachment); CRYPTOPP_ASSERT(!Attachable()); CRYPTOPP_UNUSED(newAttachment); CRYPTOPP_ASSERT(!Attachable());
@ -2076,7 +2076,7 @@ public:
//! \details "key info" means the key should have an object identifier with an algorthm id, //! \details "key info" means the key should have an object identifier with an algorthm id,
//! like a subjectPublicKeyInfo. //! like a subjectPublicKeyInfo.
//! \details To read a "raw" key without the "key info", then call the key's BERDecode() method. //! \details To read a "raw" key without the "key info", then call the key's BERDecode() method.
//! \note Load generally does not check that the key is valid. Call Validate(), if needed. //! \note Load() generally does not check that the key is valid. Call Validate(), if needed.
virtual void Load(BufferedTransformation &bt) virtual void Load(BufferedTransformation &bt)
{CRYPTOPP_UNUSED(bt); throw NotImplemented("CryptoMaterial: this object does not support loading");} {CRYPTOPP_UNUSED(bt); throw NotImplemented("CryptoMaterial: this object does not support loading");}
@ -2132,7 +2132,7 @@ public:
//! \param rng a RandomNumberGenerator to produce keying material //! \param rng a RandomNumberGenerator to produce keying material
//! \param params additional initialization parameters //! \param params additional initialization parameters
//! \throws KeyingErr if a key can't be generated or algorithm parameters are invalid //! \throws KeyingErr if a key can't be generated or algorithm parameters are invalid
//! \details If a derived class does not override GenerateRandom, then the base class throws //! \details If a derived class does not override GenerateRandom(), then the base class throws
//! NotImplemented. //! NotImplemented.
virtual void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &params = g_nullNameValuePairs) { virtual void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &params = g_nullNameValuePairs) {
CRYPTOPP_UNUSED(rng); CRYPTOPP_UNUSED(params); CRYPTOPP_UNUSED(rng); CRYPTOPP_UNUSED(params);
@ -2143,7 +2143,7 @@ public:
//! \param rng a RandomNumberGenerator to produce keying material //! \param rng a RandomNumberGenerator to produce keying material
//! \param keySize the size of the key, in bits //! \param keySize the size of the key, in bits
//! \throws KeyingErr if a key can't be generated or algorithm parameters are invalid //! \throws KeyingErr if a key can't be generated or algorithm parameters are invalid
//! \details GenerateRandomWithKeySize calls GenerateRandom with a NameValuePairs //! \details GenerateRandomWithKeySize calls GenerateRandom() with a NameValuePairs
//! object with only "KeySize" //! object with only "KeySize"
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize); void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize);
}; };