Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:08

0001 // ripemd.h - originally written and placed in the public domain by Wei Dai

0002 
0003 /// \file

0004 /// \brief Classes for RIPEMD message digest

0005 
0006 #ifndef CRYPTOPP_RIPEMD_H
0007 #define CRYPTOPP_RIPEMD_H
0008 
0009 #include "iterhash.h"
0010 
0011 NAMESPACE_BEGIN(CryptoPP)
0012 
0013 /// \brief RIPEMD-160 message digest

0014 /// \details Digest size is 160-bits.

0015 /// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-160">RIPEMD-160</a>

0016 /// \since Crypto++ 2.1

0017 class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 20, RIPEMD160>
0018 {
0019 public:
0020     static void InitState(HashWordType *state);
0021     static void Transform(word32 *digest, const word32 *data);
0022     CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RIPEMD-160";}
0023 };
0024 
0025 /// \brief RIPEMD-320 message digest

0026 /// \details Digest size is 320-bits.

0027 /// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-320">RIPEMD-320</a>

0028 /// \since Crypto++ 2.1

0029 class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 40, RIPEMD320>
0030 {
0031 public:
0032     static void InitState(HashWordType *state);
0033     static void Transform(word32 *digest, const word32 *data);
0034     CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RIPEMD-320";}
0035 };
0036 
0037 /// \brief RIPEMD-128 message digest

0038 /// \details Digest size is 128-bits.

0039 /// \warning RIPEMD-128 is considered insecure, and should not be used unless you absolutely need it for compatibility.

0040 /// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-128">RIPEMD-128</a>

0041 /// \since Crypto++ 2.1

0042 class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128>
0043 {
0044 public:
0045     static void InitState(HashWordType *state);
0046     static void Transform(word32 *digest, const word32 *data);
0047     CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RIPEMD-128";}
0048 };
0049 
0050 /// \brief RIPEMD-256 message digest

0051 /// \details Digest size is 256-bits.

0052 /// \warning RIPEMD-256 is considered insecure, and should not be used unless you absolutely need it for compatibility.

0053 /// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-256">RIPEMD-256</a>

0054 /// \since Crypto++ 2.1

0055 class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256>
0056 {
0057 public:
0058     static void InitState(HashWordType *state);
0059     static void Transform(word32 *digest, const word32 *data);
0060     CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RIPEMD-256";}
0061 };
0062 
0063 NAMESPACE_END
0064 
0065 #endif