Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

  1. #ifndef CRYPTOPP_RIPEMD_H
  2. #define CRYPTOPP_RIPEMD_H
  3. #include "iterhash.h"
  4. NAMESPACE_BEGIN(CryptoPP)
  5. //! <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-160">RIPEMD-160</a>
  6. /*! Digest Length = 160 bits */
  7. class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 20, RIPEMD160>
  8. {
  9. public:
  10. static void InitState(HashWordType *state);
  11. static void Transform(word32 *digest, const word32 *data);
  12. static const char * StaticAlgorithmName() {return "RIPEMD-160";}
  13. };
  14. /*! Digest Length = 320 bits, Security is similar to RIPEMD-160 */
  15. class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 40, RIPEMD320>
  16. {
  17. public:
  18. static void InitState(HashWordType *state);
  19. static void Transform(word32 *digest, const word32 *data);
  20. static const char * StaticAlgorithmName() {return "RIPEMD-320";}
  21. };
  22. /*! \warning RIPEMD-128 is considered insecure, and should not be used
  23. unless you absolutely need it for compatibility. */
  24. class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128>
  25. {
  26. public:
  27. static void InitState(HashWordType *state);
  28. static void Transform(word32 *digest, const word32 *data);
  29. static const char * StaticAlgorithmName() {return "RIPEMD-128";}
  30. };
  31. /*! \warning RIPEMD-256 is considered insecure, and should not be used
  32. unless you absolutely need it for compatibility. */
  33. class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256>
  34. {
  35. public:
  36. static void InitState(HashWordType *state);
  37. static void Transform(word32 *digest, const word32 *data);
  38. static const char * StaticAlgorithmName() {return "RIPEMD-256";}
  39. };
  40. NAMESPACE_END
  41. #endif