mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Update documentation
This commit is contained in:
parent
a9fe2453f6
commit
056084aefc
20
crc.h
20
crc.h
@ -30,10 +30,16 @@ public:
|
|||||||
void Update(const byte *input, size_t length);
|
void Update(const byte *input, size_t length);
|
||||||
void TruncatedFinal(byte *hash, size_t size);
|
void TruncatedFinal(byte *hash, size_t size);
|
||||||
unsigned int DigestSize() const {return DIGESTSIZE;}
|
unsigned int DigestSize() const {return DIGESTSIZE;}
|
||||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32";}
|
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32";}
|
||||||
std::string AlgorithmName() const {return StaticAlgorithmName();}
|
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);}
|
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];}
|
byte GetCrcByte(size_t i) const {return reinterpret_cast<const byte *>(&m_crc)[i];}
|
||||||
|
|
||||||
std::string AlgorithmProvider() const;
|
std::string AlgorithmProvider() const;
|
||||||
@ -57,10 +63,16 @@ public:
|
|||||||
void Update(const byte *input, size_t length);
|
void Update(const byte *input, size_t length);
|
||||||
void TruncatedFinal(byte *hash, size_t size);
|
void TruncatedFinal(byte *hash, size_t size);
|
||||||
unsigned int DigestSize() const {return DIGESTSIZE;}
|
unsigned int DigestSize() const {return DIGESTSIZE;}
|
||||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32C";}
|
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CRC32C";}
|
||||||
std::string AlgorithmName() const {return StaticAlgorithmName();}
|
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);}
|
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];}
|
byte GetCrcByte(size_t i) const {return reinterpret_cast<const byte *>(&m_crc)[i];}
|
||||||
|
|
||||||
std::string AlgorithmProvider() const;
|
std::string AlgorithmProvider() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user