diff --git a/authenc.h b/authenc.h index a41dcd210..a40a538c3 100644 --- a/authenc.h +++ b/authenc.h @@ -13,7 +13,7 @@ NAMESPACE_BEGIN(CryptoPP) //! \class AuthenticatedSymmetricCipherBase -//! \brief +//! \brief Base implementation for one direction (encryption or decryption) of a stream cipher or block cipher mode with authentication class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AuthenticatedSymmetricCipherBase : public AuthenticatedSymmetricCipher { public: @@ -22,7 +22,14 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AuthenticatedSymmetricCipherBase : public bool IsRandomAccess() const {return false;} bool IsSelfInverting() const {return true;} - void UncheckedSetKey(const byte *,unsigned int,const CryptoPP::NameValuePairs &) {assert(false);} + + //! \brief Sets the key for this object without performing parameter validation + //! \param key a byte buffer used to key the cipher + //! \param length the length of the byte buffer + //! \param params additional parameters passed as NameValuePairs + //! \details key must be at least DEFAULT_KEYLENGTH in length. + void UncheckedSetKey(const byte * key, unsigned int length,const CryptoPP::NameValuePairs ¶ms) + {CRYPTOPP_UNUSED(key), CRYPTOPP_UNUSED(length), CRYPTOPP_UNUSED(params); assert(false);} void SetKey(const byte *userKey, size_t keylength, const NameValuePairs ¶ms); void Restart() {if (m_state > State_KeySet) m_state = State_KeySet;} diff --git a/chacha.h b/chacha.h old mode 100755 new mode 100644 diff --git a/cryptlib.h b/cryptlib.h index c71a5c8ca..0bc18f599 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -164,9 +164,9 @@ class CRYPTOPP_DLL Exception : public std::exception //! \brief Retrieves a C-string describing the exception const char *what() const throw() {return (m_what.c_str());} - //! \brief Retrieves a string describing the exception + //! \brief Retrieves a string describing the exception const std::string &GetWhat() const {return m_what;} - //! \brief Sets the error string for the exception + //! \brief Sets the error string for the exception void SetWhat(const std::string &s) {m_what = s;} //! \brief Retrieves the error type for the exception ErrorType GetErrorType() const {return m_errorType;} @@ -398,8 +398,8 @@ class CRYPTOPP_NO_VTABLE NameValuePairs //! \param name the name of the value //! \param value reference to a variable to receive the value //! \throws InvalidArgument - //! \details GetRequiredParameter() throws InvalidArgument if the name - //! is not present or not of the expected type T. + //! \details GetRequiredParameter() throws InvalidArgument if the name + //! is not present or not of the expected type T. //! \sa GetValue(), GetValueWithDefault(), GetIntValue(), GetIntValueWithDefault(), //! GetRequiredParameter() and GetRequiredIntParameter() template @@ -414,8 +414,8 @@ class CRYPTOPP_NO_VTABLE NameValuePairs //! \param name the name of the value //! \param value reference to a variable to receive the value //! \throws InvalidArgument - //! \details GetRequiredParameter() throws InvalidArgument if the name - //! is not present or not of the expected type T. + //! \details GetRequiredParameter() throws InvalidArgument if the name + //! is not present or not of the expected type T. //! \sa GetValue(), GetValueWithDefault(), GetIntValue(), GetIntValueWithDefault(), //! GetRequiredParameter() and GetRequiredIntParameter() CRYPTOPP_DLL void GetRequiredIntParameter(const char *className, const char *name, int &value) const @@ -486,7 +486,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Clonable //! \return a copy of this object //! \throws NotImplemented //! \note this is \a not implemented by most classes - //! \sa NotCopyable + //! \sa NotCopyable virtual Clonable* Clone() const {throw NotImplemented("Clone() is not implemented yet.");} // TODO: make this =0 }; @@ -675,7 +675,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE SimpleKeyingInterface //! \param key a byte buffer used to key the cipher //! \param length the length of the byte buffer //! \param params additional parameters passed as NameValuePairs - //! \details key must be at least DEFAULT_KEYLENGTH in length. + //! \details key must be at least DEFAULT_KEYLENGTH in length. virtual void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms) =0; //! \brief Validates the key length @@ -705,7 +705,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE SimpleKeyingInterface size_t ThrowIfInvalidIVLength(int length); //! \brief Retrieves and validates the IV - //! \param params NameValuePairs with the IV supplied as a ConstByteArrayParameter + //! \param params NameValuePairs with the IV supplied as a ConstByteArrayParameter //! \param size the length of the IV, in bytes //! \return a pointer to the first byte of the IV //! \throws InvalidArgument if the number of rounds are invalid @@ -1536,7 +1536,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BufferedTransformation : public Algorithm, //! \details propagation count includes this object. Setting propagation to 1 means this //! object only. Setting propagation to -1 means unlimited propagation. //! \note Hard flushes must be used with care. It means try to process and output everything, even if - //! there may not be enough data to complete the action. For example, hard flushing a HexDecoder + //! there may not be enough data to complete the action. For example, hard flushing a HexDecoder //! would cause an error if you do it after inputing an odd number of hex encoded characters. //! \note For some types of filters, like ZlibDecompressor, hard flushes can only //! be done at "synchronization points". These synchronization points are positions in the data @@ -1552,7 +1552,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BufferedTransformation : public Algorithm, //! propagation, and then pass the signal on to attached transformations if the value is not 0. //! \details propagation count includes this object. Setting propagation to 1 means this //! object only. Setting propagation to -1 means unlimited propagation. - //! \note There should be a MessageEnd() immediately before MessageSeriesEnd(). + //! \note There should be a MessageEnd() immediately before MessageSeriesEnd(). virtual bool MessageSeriesEnd(int propagation=-1, bool blocking=true); //! \brief Set propagation of automatically generated and transferred signals @@ -1968,7 +1968,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BufferedTransformation : public Algorithm, //! propagation, and then pass the signal on to attached transformations if the value is not 0. //! \details propagation count includes this object. Setting propagation to 1 means this //! object only. Setting propagation to -1 means unlimited propagation. - //! \note There should be a MessageEnd() immediately before MessageSeriesEnd(). + //! \note There should be a MessageEnd() immediately before MessageSeriesEnd(). virtual bool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true); //! \brief Sets the default retrieval channel @@ -2081,7 +2081,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CryptoMaterial : public NameValuePairs //! \throws NotImplemented //! \details Save() writes the material to a BufferedTransformation. //! \details If the material is a key, then the key is written with ASN.1 DER encoding. The key - //! includes an object identifier with an algorthm id, like a subjectPublicKeyInfo. + //! includes an object identifier with an algorthm id, like a subjectPublicKeyInfo. //! \details A "raw" key without the "key info" can be saved using a key's DEREncode() method. //! \details If a derived class does not override Save(), then the base class throws //! NotImplemented(). @@ -2099,7 +2099,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CryptoMaterial : public NameValuePairs //!
  • the key should be a "key info" //! //! \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. //! \note Load generally does not check that the key is valid. Call Validate(), if needed. virtual void Load(BufferedTransformation &bt) @@ -2170,7 +2170,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE GeneratableCryptoMaterial : virtual public //! \param rng a RandomNumberGenerator to produce keying material //! \param keySize the size of the key, in bits //! \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" void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize); }; diff --git a/misc.h b/misc.h index 77257beca..b27c79ff8 100644 --- a/misc.h +++ b/misc.h @@ -2009,7 +2009,7 @@ inline void PutWord(bool assumeAligned, ByteOrder order, byte *block, T value, c //! \tparam A flag indicating alignment //! \details GetBlock() provides alternate read access to a block of memory. The enumeration B is //! BigEndian or LittleEndian. The flag A indicates if the memory block is aligned for class or type T. -//! Repeatedly applying \ref GetBlock::operator() "operator()" results in advancing in the block of memory. +//! Repeatedly applying operator() results in advancing in the block of memory. //! \details An example of reading two word32 values from a block of memory is shown below. w1 //! will be 0x03020100 and w1 will be 0x07060504. //!
    @@ -2051,7 +2051,7 @@ class GetBlock
     //! \tparam A flag indicating alignment
     //! \details GetBlock() provides alternate write access to a block of memory. The enumeration B is
     //!   BigEndian or LittleEndian. The flag A indicates if the memory block is aligned for class or type T.
    -//!   Repeatedly applying \ref PutBlock::operator() "operator()" results in advancing in the block of memory.
    +//!   Repeatedly applying operator() results in advancing in the block of memory.
     //! \details An example of reading two word32 values from a block of memory is shown below. w1
     //!   will be 0x03020100 and w1 will be 0x07060504.
     //!