From ac6987f3aee8fedd52a08f8d6e9b7d5ad28559bb Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 7 Dec 2020 23:35:10 -0500 Subject: Use \return and \throw consitently in the docs --- asn.h | 62 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'asn.h') diff --git a/asn.h b/asn.h index 995d358b..ab713ad2 100644 --- a/asn.h +++ b/asn.h @@ -117,14 +117,14 @@ public: /// \brief DER encode a length /// \param bt BufferedTransformation object for writing /// \param length the size to encode -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding CRYPTOPP_DLL size_t CRYPTOPP_API DERLengthEncode(BufferedTransformation &bt, lword length); /// \brief BER decode a length /// \param bt BufferedTransformation object for reading /// \param length the decoded size -/// \returns true if the value was decoded -/// \throws BERDecodeError if the value fails to decode or is too large for size_t +/// \return true if the value was decoded +/// \throw BERDecodeError if the value fails to decode or is too large for size_t /// \details BERLengthDecode() returns false if the encoding is indefinite length. CRYPTOPP_DLL bool CRYPTOPP_API BERLengthDecode(BufferedTransformation &bt, size_t &length); @@ -140,25 +140,25 @@ CRYPTOPP_DLL void CRYPTOPP_API BERDecodeNull(BufferedTransformation &bt); /// \param bt BufferedTransformation object for writing /// \param str the string to encode /// \param strLen the length of the string -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeOctetString(BufferedTransformation &bt, const byte *str, size_t strLen); /// \brief DER encode octet string /// \param bt BufferedTransformation object for reading /// \param str the string to encode -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeOctetString(BufferedTransformation &bt, const SecByteBlock &str); /// \brief BER decode octet string /// \param bt BufferedTransformation object for reading /// \param str the decoded string -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str); /// \brief BER decode octet string /// \param bt BufferedTransformation object for reading /// \param str the decoded string -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt, BufferedTransformation &str); /// \brief DER encode text string @@ -166,7 +166,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt /// \param str the string to encode /// \param strLen the length of the string, in bytes /// \param asnTag the ASN.1 identifier -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding /// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING /// \since Crypto++ 8.3 CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const byte* str, size_t strLen, byte asnTag); @@ -175,7 +175,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, /// \param bt BufferedTransformation object for writing /// \param str the string to encode /// \param asnTag the ASN.1 identifier -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding /// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING /// \since Crypto++ 8.3 CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const SecByteBlock &str, byte asnTag); @@ -184,7 +184,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, /// \param bt BufferedTransformation object for writing /// \param str the string to encode /// \param asnTag the ASN.1 identifier -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding /// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING /// \since Crypto++ 6.0 CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const std::string &str, byte asnTag); @@ -209,7 +209,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeTextString(BufferedTransformation &bt, /// \param bt BufferedTransformation object for writing /// \param str the date to encode /// \param asnTag the ASN.1 identifier -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding /// \details BERDecodeDate() can be used for UTC_TIME and GENERALIZED_TIME /// \since Crypto++ 8.3 CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeDate(BufferedTransformation &bt, const SecByteBlock &str, byte asnTag); @@ -227,7 +227,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeDate(BufferedTransformation &bt, SecBy /// \param str the string to encode /// \param strLen the length of the string /// \param unusedBits the number of unused bits -/// \returns the number of octets used for the encoding +/// \return the number of octets used for the encoding /// \details The caller is responsible for shifting octets if unusedBits is /// not 0. For example, to DER encode a web server X.509 key usage, the 101b /// bit mask is often used (digitalSignature and keyEncipherment). In this @@ -253,7 +253,7 @@ CRYPTOPP_DLL void CRYPTOPP_API DERReencode(BufferedTransformation &bt, BufferedT /// \brief BER decode size /// \param bt BufferedTransformation object for reading -/// \returns the length of the ASN.1 value, in bytes +/// \return the length of the ASN.1 value, in bytes /// \details BERDecodePeekLength() determines the length of a value without /// consuming octets in the stream. The stream must use definite length encoding. /// If indefinite length encoding is used or an error occurs, then 0 is returned. @@ -295,7 +295,7 @@ public: /// \brief BER decode an OID /// \param bt BufferedTransformation object - /// \throws BERDecodeErr() if decoded value doesn't match an expected OID + /// \throw BERDecodeErr() if decoded value doesn't match an expected OID /// \details BERDecodeAndCheck() can be used to parse an OID and verify it matches an expected. ///
 	///   BERSequenceDecoder key(bt);
@@ -306,14 +306,14 @@ public:
 	void BERDecodeAndCheck(BufferedTransformation &bt) const;
 
 	/// \brief Determine if OID is empty
-	/// \returns true if OID has 0 elements, false otherwise
+	/// \return true if OID has 0 elements, false otherwise
 	/// \since Crypto++ 8.0
 	bool Empty() const {
 		return m_values.empty();
 	}
 
 	/// \brief Retrieve OID value array
-	/// \returns OID value vector
+	/// \return OID value vector
 	/// \since Crypto++ 8.0
 	const std::vector& GetValues() const {
 		return m_values;
@@ -321,7 +321,7 @@ public:
 
 	/// \brief Print an OID
 	/// \param out ostream object
-	/// \returns ostream reference
+	/// \return ostream reference
 	/// \details Print() writes the OID in a customary format, like
 	///  1.2.840.113549.1.1.11. The caller is reposnsible to convert the
 	///  OID to a friendly name, like sha256WithRSAEncryption.
@@ -400,13 +400,13 @@ public:
 	explicit BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag);
 
 	/// \brief Determine length encoding
-	/// \returns true if the ASN.1 object is definite length encoded, false otherwise
+	/// \return true if the ASN.1 object is definite length encoded, false otherwise
 	bool IsDefiniteLength() const {
 		return m_definiteLength;
 	}
 
 	/// \brief Determine remaining length
-	/// \returns number of octets that remain to be consumed
+	/// \return number of octets that remain to be consumed
 	/// \details RemainingLength() is only valid if IsDefiniteLength()
 	///  returns true.
 	lword RemainingLength() const {
@@ -415,19 +415,19 @@ public:
 	}
 
 	/// \brief Determine end of stream
-	/// \returns true if all octets have been consumed, false otherwise
+	/// \return true if all octets have been consumed, false otherwise
 	bool EndReached() const;
 
 	/// \brief Determine next octet
-	/// \returns next octet in the stream
+	/// \return next octet in the stream
 	/// \details PeekByte does not consume the octet.
-	/// \throws BERDecodeError if there are no octets remaining
+	/// \throw BERDecodeError if there are no octets remaining
 	byte PeekByte() const;
 
 	/// \brief Determine next octet
 	/// \details CheckByte reads the next byte in the stream and verifies
 	///  the octet matches b.
-	/// \throws BERDecodeError if the next octet is not b
+	/// \throw BERDecodeError if the next octet is not b
 	void CheckByte(byte b);
 
 	/// \brief Transfer bytes to another BufferedTransformation
@@ -707,7 +707,7 @@ public:
 	void DEREncode(BufferedTransformation &bt) const;
 
 	/// \brief Retrieves the OID of the algorithm
-	/// \returns OID of the algorithm
+	/// \return OID of the algorithm
 	virtual OID GetAlgorithmID() const =0;
 
 	/// \brief Decode algorithm parameters
@@ -753,7 +753,7 @@ public:
 	void DEREncode(BufferedTransformation &bt) const;
 
 	/// \brief Retrieves the OID of the algorithm
-	/// \returns OID of the algorithm
+	/// \return OID of the algorithm
 	virtual OID GetAlgorithmID() const =0;
 
 	/// \brief Decode optional parameters
@@ -850,7 +850,7 @@ size_t DEREncodeUnsigned(BufferedTransformation &out, T w, byte asnTag = INTEGER
 /// \param asnTag the ASN.1 identifier
 /// \param minValue the minimum expected value
 /// \param maxValue the maximum expected value
-/// \throws BERDecodeErr() if the value cannot be parsed or the decoded value is not within range.
+/// \throw BERDecodeErr() if the value cannot be parsed or the decoded value is not within range.
 /// \details DEREncodeUnsigned() can be used with INTEGER, BOOLEAN, and ENUM
 template 
 void BERDecodeUnsigned(BufferedTransformation &in, T &w, byte asnTag = INTEGER,
@@ -902,30 +902,30 @@ void BERDecodeUnsigned(BufferedTransformation &in, T &w, byte asnTag = INTEGER,
 /// \brief Compare two OIDs for equality
 /// \param lhs the first OID
 /// \param rhs the second OID
-/// \returns true if the OIDs are equal, false otherwise
+/// \return true if the OIDs are equal, false otherwise
 inline bool operator==(const OID &lhs, const OID &rhs);
 /// \brief Compare two OIDs for inequality
 /// \param lhs the first OID
 /// \param rhs the second OID
-/// \returns true if the OIDs are not equal, false otherwise
+/// \return true if the OIDs are not equal, false otherwise
 inline bool operator!=(const OID &lhs, const OID &rhs);
 /// \brief Compare two OIDs for ordering
 /// \param lhs the first OID
 /// \param rhs the second OID
-/// \returns true if the first OID is less than the second OID, false otherwise
+/// \return true if the first OID is less than the second OID, false otherwise
 /// \details operator<() calls std::lexicographical_compare() on each element in the array of values.
 inline bool operator<(const OID &lhs, const OID &rhs);
 /// \brief Compare two OIDs for ordering
 /// \param lhs the first OID
 /// \param rhs the second OID
-/// \returns true if the first OID is less than or equal to the second OID, false otherwise
+/// \return true if the first OID is less than or equal to the second OID, false otherwise
 /// \details operator<=() is implemented in terms of operator==() and operator<().
 /// \since Crypto++ 8.3
 inline bool operator<=(const OID &lhs, const OID &rhs);
 /// \brief Compare two OIDs for ordering
 /// \param lhs the first OID
 /// \param rhs the second OID
-/// \returns true if the first OID is greater than or equal to the second OID, false otherwise
+/// \return true if the first OID is greater than or equal to the second OID, false otherwise
 /// \details operator>=() is implemented in terms of operator<().
 /// \since Crypto++ 8.3
 inline bool operator>=(const OID &lhs, const OID &rhs);
-- 
cgit v1.2.1