md2.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_MD2_H
  10. # define OPENSSL_MD2_H
  11. # pragma once
  12. # include <openssl/macros.h>
  13. # ifndef OPENSSL_NO_DEPRECATED_3_0
  14. # define HEADER_MD2_H
  15. # endif
  16. # include <openssl/opensslconf.h>
  17. # ifndef OPENSSL_NO_MD2
  18. # include <stddef.h>
  19. # ifdef __cplusplus
  20. extern "C" {
  21. # endif
  22. # define MD2_DIGEST_LENGTH 16
  23. # if !defined(OPENSSL_NO_DEPRECATED_3_0)
  24. typedef unsigned char MD2_INT;
  25. # define MD2_BLOCK 16
  26. typedef struct MD2state_st {
  27. unsigned int num;
  28. unsigned char data[MD2_BLOCK];
  29. MD2_INT cksm[MD2_BLOCK];
  30. MD2_INT state[MD2_BLOCK];
  31. } MD2_CTX;
  32. # endif
  33. # ifndef OPENSSL_NO_DEPRECATED_3_0
  34. OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void);
  35. OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c);
  36. OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data,
  37. size_t len);
  38. OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c);
  39. OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n,
  40. unsigned char *md);
  41. # endif
  42. # ifdef __cplusplus
  43. }
  44. # endif
  45. # endif
  46. #endif