Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | 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 = 160 bits */
    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 /*! Digest Length = 128 bits */
    00028 class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128>
    00029 {
    00030 public:
    00031         static void InitState(HashWordType *state);
    00032         static void Transform(word32 *digest, const word32 *data);
    00033         static const char * StaticAlgorithmName() {return "RIPEMD-128";}
    00034 };
    00035
    00036 /*! Digest Length = 256 bits, Security = 128 bits */
    00037 class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256>
    00038 {
    00039 public:
    00040         static void InitState(HashWordType *state);
    00041         static void Transform(word32 *digest, const word32 *data);
    00042         static const char * StaticAlgorithmName() {return "RIPEMD-256";}
    00043 };
    00044
    00045 NAMESPACE_END
    00046
    00047 #endif