Update documentation

This commit is contained in:
Jeffrey Walton 2021-11-29 10:54:17 -05:00
parent a9fe2453f6
commit 056084aefc
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

12
crc.h
View File

@ -33,7 +33,13 @@ public:
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32";}
std::string AlgorithmName() const {return StaticAlgorithmName();}
/// \brief Updates a CRC with additional input
/// \param b the additional input as a byte
void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);}
/// \brief Retrieves the i-th byte of the CRC
/// \param i the additional input as a byte
/// \return the byte at the i-th position
byte GetCrcByte(size_t i) const {return reinterpret_cast<const byte *>(&m_crc)[i];}
std::string AlgorithmProvider() const;
@ -60,7 +66,13 @@ public:
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32C";}
std::string AlgorithmName() const {return StaticAlgorithmName();}
/// \brief Updates a CRC with additional input
/// \param b the additional input as a byte
void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);}
/// \brief Retrieves the i-th byte of the CRC
/// \param i the additional input as a byte
/// \return the byte at the i-th position
byte GetCrcByte(size_t i) const {return reinterpret_cast<const byte *>(&m_crc)[i];}
std::string AlgorithmProvider() const;