You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ripemd.h 1.6 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OPENSSL_RIPEMD_H
  10. #define OPENSSL_RIPEMD_H
  11. #pragma once
  12. #include <openssl/macros.h>
  13. #ifndef OPENSSL_NO_DEPRECATED_3_0
  14. #define HEADER_RIPEMD_H
  15. #endif
  16. #include <openssl/opensslconf.h>
  17. #ifndef OPENSSL_NO_RMD160
  18. #include <openssl/e_os2.h>
  19. #include <stddef.h>
  20. #define RIPEMD160_DIGEST_LENGTH 20
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. #if !defined(OPENSSL_NO_DEPRECATED_3_0)
  26. #define RIPEMD160_LONG unsigned int
  27. #define RIPEMD160_CBLOCK 64
  28. #define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK / 4)
  29. typedef struct RIPEMD160state_st
  30. {
  31. RIPEMD160_LONG A, B, C, D, E;
  32. RIPEMD160_LONG Nl, Nh;
  33. RIPEMD160_LONG data[RIPEMD160_LBLOCK];
  34. unsigned int num;
  35. } RIPEMD160_CTX;
  36. #endif
  37. #ifndef OPENSSL_NO_DEPRECATED_3_0
  38. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX* c);
  39. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX* c, const void* data, size_t len);
  40. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char* md, RIPEMD160_CTX* c);
  41. OSSL_DEPRECATEDIN_3_0 unsigned char* RIPEMD160(const unsigned char* d, size_t n, unsigned char* md);
  42. OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX* c, const unsigned char* b);
  43. #endif
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif
  48. #endif