- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# ripemd.h

    00001 #ifndef CRYPTOPP_RIPEMD_H
    00002 #define CRYPTOPP_RIPEMD_H
    00003
    00004 #include "iterhash.h"
    00005
    00006 NAMESPACE_BEGIN(CryptoPP)
    00007
    00008 //! <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-160">RIPEMD-160</a>
    00009 /*! Digest Length = 160 bits */
    00010 class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 20, RIPEMD160>
    00011 {
    00012 public:
    00013         static void InitState(HashWordType *state);
    00014         static void Transform(word32 *digest, const word32 *data);
    00015         static const char * StaticAlgorithmName() {return "RIPEMD-160";}
    00016 };
    00017
    00018 /*! Digest Length = 320 bits, Security is similar to RIPEMD-160 */
    00019 class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 40, RIPEMD320>
    00020 {
    00021 public:
    00022         static void InitState(HashWordType *state);
    00023         static void Transform(word32 *digest, const word32 *data);
    00024         static const char * StaticAlgorithmName() {return "RIPEMD-320";}
    00025 };
    00026
    00027 /*! \warning RIPEMD-128 is considered insecure, and should not be used
    00028         unless you absolutely need it for compatibility. */
    00029 class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128>
    00030 {
    00031 public:
    00032         static void InitState(HashWordType *state);
    00033         static void Transform(word32 *digest, const word32 *data);
    00034         static const char * StaticAlgorithmName() {return "RIPEMD-128";}
    00035 };
    00036
    00037 /*! \warning RIPEMD-256 is considered insecure, and should not be used
    00038         unless you absolutely need it for compatibility. */
    00039 class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256>
    00040 {
    00041 public:
    00042         static void InitState(HashWordType *state);
    00043         static void Transform(word32 *digest, const word32 *data);
    00044         static const char * StaticAlgorithmName() {return "RIPEMD-256";}
    00045 };
    00046
    00047 NAMESPACE_END
    00048
    00049 #endif