Update documentation

This commit is contained in:
Jeffrey Walton 2017-12-24 21:07:18 -05:00
parent 41da3fa7f1
commit b20a91f6b2
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
9 changed files with 46 additions and 27 deletions

View File

@ -12,7 +12,7 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
/// \class Base64Encoder /// \class Base64Encoder
/// \brief Base64 encodes data /// \brief Base64 encodes data using DUDE
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>. /// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>.
class Base64Encoder : public SimpleProxyFilter class Base64Encoder : public SimpleProxyFilter
{ {
@ -54,7 +54,7 @@ public:
}; };
/// \class Base64Decoder /// \class Base64Decoder
/// \brief Base64 decodes data /// \brief Base64 decodes data using DUDE
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>. /// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>.
class Base64Decoder : public BaseN_Decoder class Base64Decoder : public BaseN_Decoder
{ {

View File

@ -1,7 +1,6 @@
// cbcmac.h - originally written and placed in the public domain by Wei Dai // cbcmac.h - originally written and placed in the public domain by Wei Dai
/// \file /// \file
/// \headerfile cbcmac.h
/// \brief Classes for CBC MAC /// \brief Classes for CBC MAC
#ifndef CRYPTOPP_CBCMAC_H #ifndef CRYPTOPP_CBCMAC_H
@ -12,7 +11,7 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
/// _ /// \brief CBC-MAC base class
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_MAC_Base : public MessageAuthenticationCode class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_MAC_Base : public MessageAuthenticationCode
{ {
public: public:
@ -32,10 +31,11 @@ private:
unsigned int m_counter; unsigned int m_counter;
}; };
/// <a href="http://www.weidai.com/scan-mirror/mac.html#CBC-MAC">CBC-MAC</a> /// \brief CBC-MAC
/*! Compatible with FIPS 113. T should be a class derived from BlockCipherDocumentation. /// \tparam T BlockCipherDocumentation derived class
Secure only for fixed length messages. For variable length messages use CMAC or DMAC. /// \details CBC-MAC is compatible with FIPS 113. The MAC is secure only for fixed
*/ /// length messages. For variable length messages use CMAC or DMAC.
/// \sa <a href="http://www.weidai.com/scan-mirror/mac.html#CBC-MAC">CBC-MAC</a>
template <class T> template <class T>
class CBC_MAC : public MessageAuthenticationCodeImpl<CBC_MAC_Base, CBC_MAC<T> >, public SameKeyLengthAs<T> class CBC_MAC : public MessageAuthenticationCodeImpl<CBC_MAC_Base, CBC_MAC<T> >, public SameKeyLengthAs<T>
{ {

28
emsa2.h
View File

@ -16,12 +16,20 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
/// \class EMSA2HashId
/// \brief EMSA2 hash identifier
/// \tparam H HashTransformation derived class
/// \since Crypto++ 5.0
template <class H> class EMSA2HashId template <class H> class EMSA2HashId
{ {
public: public:
static const byte id; static const byte id;
}; };
/// \class EMSA2Pad
/// \brief EMSA2 padding method
/// \tparam BASE Message encoding method
/// \since Crypto++ 5.0
template <class BASE> template <class BASE>
class EMSA2HashIdLookup : public BASE class EMSA2HashIdLookup : public BASE
{ {
@ -57,7 +65,9 @@ CRYPTOPP_DLL_TEMPLATE_CLASS EMSA2HashId<SHA384>;
CRYPTOPP_DLL_TEMPLATE_CLASS EMSA2HashId<SHA512>; CRYPTOPP_DLL_TEMPLATE_CLASS EMSA2HashId<SHA512>;
#endif #endif
/// _ /// \class EMSA2Pad
/// \brief EMSA2 padding method
/// \since Crypto++ 5.0
class CRYPTOPP_DLL EMSA2Pad : public EMSA2HashIdLookup<PK_DeterministicSignatureMessageEncodingMethod> class CRYPTOPP_DLL EMSA2Pad : public EMSA2HashIdLookup<PK_DeterministicSignatureMessageEncodingMethod>
{ {
public: public:
@ -72,12 +82,16 @@ public:
byte *representative, size_t representativeBitLength) const; byte *representative, size_t representativeBitLength) const;
}; };
/// EMSA2, for use with RWSS and RSA_ISO // EMSA2, for use with RWSS and RSA_ISO
/*! Only the following hash functions are supported by this signature standard: // Only the following hash functions are supported by this signature standard:
\dontinclude emsa2.h // \dontinclude emsa2.h
\skip EMSA2HashId can be instantiated // \skip EMSA2HashId can be instantiated
\until end of list // \until end of list
*/
/// \class P1363_EMSA2
/// \brief EMSA2/P1363 padding method
/// \details Use with RWSS and RSA_ISO
/// \since Crypto++ 5.0
struct P1363_EMSA2 : public SignatureStandard struct P1363_EMSA2 : public SignatureStandard
{ {
typedef EMSA2Pad SignatureMessageEncodingMethod; typedef EMSA2Pad SignatureMessageEncodingMethod;

View File

@ -150,6 +150,9 @@ struct P1363_EMSA5 : public SignatureStandard
typedef EMSA5Pad<P1363_MGF1> SignatureMessageEncodingMethod; typedef EMSA5Pad<P1363_MGF1> SignatureMessageEncodingMethod;
}; };
/// \class ESIGN_Keys
/// \brief ESIGN keys
/// \since Crypto++ 5.0
struct ESIGN_Keys struct ESIGN_Keys
{ {
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ESIGN";} CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ESIGN";}

View File

@ -66,10 +66,10 @@ protected:
unsigned int m_digestSize, m_counter; unsigned int m_digestSize, m_counter;
}; };
/// \class Keccak_224 /// \class Keccak_Final
/// \tparam T_DigestSize controls the digest size as a template parameter instead of a per-class constant /// \brief Keccak message digest template
/// \brief Keccak-X message digest, template for more fine-grained typedefs /// \tparam T_DigestSize the size of the digest, in bytes
/// \since Crypto++ 6.0.0 /// \since Crypto++ 6.0
template<unsigned int T_DigestSize> template<unsigned int T_DigestSize>
class Keccak_Final : public Keccak class Keccak_Final : public Keccak
{ {

View File

@ -2,7 +2,7 @@
/// \file pkcspad.h /// \file pkcspad.h
/// \brief Classes for PKCS padding schemes /// \brief Classes for PKCS padding schemes
/// \details PKCS#1 v1.5, v2.0 and P1363a allow MD2, MD5, SHA1, SHA224, SHA256, SHA384, SHA512, Tiger and RipeMd-160 to be instantiated. /// \details PKCS #1 v1.5, v2.0 and P1363a allow MD2, MD5, SHA1, SHA224, SHA256, SHA384, SHA512, Tiger and RipeMd-160 to be instantiated.
#ifndef CRYPTOPP_PKCSPAD_H #ifndef CRYPTOPP_PKCSPAD_H
#define CRYPTOPP_PKCSPAD_H #define CRYPTOPP_PKCSPAD_H
@ -17,7 +17,7 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
/// \class PKCS_EncryptionPaddingScheme /// \class PKCS_EncryptionPaddingScheme
/// \brief PKCS#1 v1.5 Encryption Padding Scheme /// \brief PKCS #1 v1.5 Encryption Padding Scheme
/// \sa <a href="http://www.weidai.com/scan-mirror/ca.html#cem_PKCS1-1.5">EME-PKCS1-v1_5</a> /// \sa <a href="http://www.weidai.com/scan-mirror/ca.html#cem_PKCS1-1.5">EME-PKCS1-v1_5</a>
class PKCS_EncryptionPaddingScheme : public PK_EncryptionMessageEncodingMethod class PKCS_EncryptionPaddingScheme : public PK_EncryptionMessageEncodingMethod
{ {
@ -30,7 +30,7 @@ public:
}; };
/// \class PKCS_DigestDecoration /// \class PKCS_DigestDecoration
/// \brief PKCS#1 decoration data structure /// \brief PKCS #1 decoration data structure
template <class H> class PKCS_DigestDecoration template <class H> class PKCS_DigestDecoration
{ {
public: public:
@ -39,7 +39,7 @@ public:
}; };
// PKCS_DigestDecoration can be instantiated with the following // PKCS_DigestDecoration can be instantiated with the following
// classes as specified in PKCS#1 v2.0 and P1363a // classes as specified in PKCS #1 v2.0 and P1363a
class SHA1; class SHA1;
class SHA224; class SHA224;
class SHA256; class SHA256;
@ -79,7 +79,7 @@ const byte PKCS_DigestDecoration<H>::decoration[1] = {0x00};
#endif #endif
/// \class PKCS1v15_SignatureMessageEncodingMethod /// \class PKCS1v15_SignatureMessageEncodingMethod
/// \brief PKCS#1 v1.5 Signature Encoding Scheme /// \brief PKCS #1 v1.5 Signature Encoding Scheme
/// \sa <a href="http://www.weidai.com/scan-mirror/sig.html#sem_PKCS1-1.5">EMSA-PKCS1-v1_5</a> /// \sa <a href="http://www.weidai.com/scan-mirror/sig.html#sem_PKCS1-1.5">EMSA-PKCS1-v1_5</a>
class CRYPTOPP_DLL PKCS1v15_SignatureMessageEncodingMethod : public PK_DeterministicSignatureMessageEncodingMethod class CRYPTOPP_DLL PKCS1v15_SignatureMessageEncodingMethod : public PK_DeterministicSignatureMessageEncodingMethod
{ {

View File

@ -1631,7 +1631,9 @@ protected:
} }
}; };
/// _ /// \class DL_VerifierBase
/// \brief Discret Log (DL) Verifier base class
/// \tparam T Element
template <class T> template <class T>
class CRYPTOPP_NO_VTABLE DL_VerifierBase : public DL_SignatureSchemeBase<PK_Verifier, DL_PublicKey<T> > class CRYPTOPP_NO_VTABLE DL_VerifierBase : public DL_SignatureSchemeBase<PK_Verifier, DL_PublicKey<T> >
{ {

2
sha3.h
View File

@ -51,7 +51,7 @@ protected:
unsigned int m_digestSize, m_counter; unsigned int m_digestSize, m_counter;
}; };
/// \class SHA3_224 /// \class SHA3_Final
/// \brief SHA3 message digest template /// \brief SHA3 message digest template
/// \tparam T_DigestSize the size of the digest, in bytes /// \tparam T_DigestSize the size of the digest, in bytes
/// \since Crypto++ 5.6.2 /// \since Crypto++ 5.6.2

View File

@ -605,7 +605,7 @@ bool ValidatePBKDF()
bool pass = true; bool pass = true;
{ {
// from OpenSSL PKCS#12 Program FAQ v1.77, at http://www.drh-consultancy.demon.co.uk/test.txt // from OpenSSL PKCS #12 Program FAQ v1.77, at http://www.drh-consultancy.demon.co.uk/test.txt
PBKDF_TestTuple testSet[] = PBKDF_TestTuple testSet[] =
{ {
{1, 1, "0073006D006500670000", "0A58CF64530D823F", "8AAAE6297B6CB04642AB5B077851284EB7128F1A2A7FBCA3"}, {1, 1, "0073006D006500670000", "0A58CF64530D823F", "8AAAE6297B6CB04642AB5B077851284EB7128F1A2A7FBCA3"},