md2.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (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 HEADER_MD2_H
  10. # define HEADER_MD2_H
  11. # include <openssl/opensslconf.h>
  12. # ifndef OPENSSL_NO_MD2
  13. # include <stddef.h>
  14. # ifdef __cplusplus
  15. extern "C" {
  16. # endif
  17. typedef unsigned char MD2_INT;
  18. # define MD2_DIGEST_LENGTH 16
  19. # define MD2_BLOCK 16
  20. typedef struct MD2state_st {
  21. unsigned int num;
  22. unsigned char data[MD2_BLOCK];
  23. MD2_INT cksm[MD2_BLOCK];
  24. MD2_INT state[MD2_BLOCK];
  25. } MD2_CTX;
  26. const char *MD2_options(void);
  27. int MD2_Init(MD2_CTX *c);
  28. int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
  29. int MD2_Final(unsigned char *md, MD2_CTX *c);
  30. unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md);
  31. # ifdef __cplusplus
  32. }
  33. # endif
  34. # endif
  35. #endif