Update documentation

This commit is contained in:
Jeffrey Walton 2020-12-15 04:05:17 -05:00
parent 45ce17c492
commit bfeba0d300
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,8 @@
// iterhash.h - originally written and placed in the public domain by Wei Dai
/// \file iterhash.h
/// \brief Base classes for iterated hashes
#ifndef CRYPTOPP_ITERHASH_H
#define CRYPTOPP_ITERHASH_H

View File

@ -1,3 +1,8 @@
// trunhash.h - originally written and placed in the public domain by Wei Dai
/// \file trunhash.h
/// \brief Classes for truncated hashes
#ifndef CRYPTOPP_TRUNHASH_H
#define CRYPTOPP_TRUNHASH_H
@ -5,6 +10,8 @@
NAMESPACE_BEGIN(CryptoPP)
/// \brief Null hash
/// \details A null hash that conforms to HashTransformation interface
class NullHash : public HashTransformation
{
public:
@ -18,15 +25,19 @@ public:
{CRYPTOPP_UNUSED(digest);CRYPTOPP_UNUSED(digestLength);return true;}
};
/// construct new HashModule with smaller DigestSize() from existing one
/// \brief Construct new HashModule with smaller digest size from an existing one
/// \tparam T HashTransformation derived class
template <class T>
class TruncatedHashTemplate : public HashTransformation
{
public:
/// \brief Construct a TruncatedHashTemplate
TruncatedHashTemplate(T hm, unsigned int digestSize)
: m_hm(hm), m_digestSize(digestSize) {}
/// \brief Construct a TruncatedHashTemplate
TruncatedHashTemplate(const byte *key, size_t keyLength, unsigned int digestSize)
: m_hm(key, keyLength), m_digestSize(digestSize) {}
/// \brief Construct a TruncatedHashTemplate
TruncatedHashTemplate(size_t digestSize)
: m_digestSize(digestSize) {}