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.

ripemd160.h 688B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2014-2016 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_CRYPTO_RIPEMD160_H
  5. #define STARWELS_CRYPTO_RIPEMD160_H
  6. #include <stdint.h>
  7. #include <stdlib.h>
  8. /** A hasher class for RIPEMD-160. */
  9. class CRIPEMD160
  10. {
  11. private:
  12. uint32_t s[5];
  13. unsigned char buf[64];
  14. uint64_t bytes;
  15. public:
  16. static const size_t OUTPUT_SIZE = 20;
  17. CRIPEMD160();
  18. CRIPEMD160& Write(const unsigned char* data, size_t len);
  19. void Finalize(unsigned char hash[OUTPUT_SIZE]);
  20. CRIPEMD160& Reset();
  21. };
  22. #endif // STARWELS_CRYPTO_RIPEMD160_H