ripemd.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # endif
  24. # if !defined(OPENSSL_NO_DEPRECATED_3_0)
  25. # define RIPEMD160_LONG unsigned int
  26. # define RIPEMD160_CBLOCK 64
  27. # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4)
  28. typedef struct RIPEMD160state_st {
  29. RIPEMD160_LONG A, B, C, D, E;
  30. RIPEMD160_LONG Nl, Nh;
  31. RIPEMD160_LONG data[RIPEMD160_LBLOCK];
  32. unsigned int num;
  33. } RIPEMD160_CTX;
  34. # endif
  35. # ifndef OPENSSL_NO_DEPRECATED_3_0
  36. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX *c);
  37. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data,
  38. size_t len);
  39. OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
  40. OSSL_DEPRECATEDIN_3_0 unsigned char *RIPEMD160(const unsigned char *d, size_t n,
  41. unsigned char *md);
  42. OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX *c,
  43. const unsigned char *b);
  44. # endif
  45. # ifdef __cplusplus
  46. }
  47. # endif
  48. # endif
  49. #endif