md_wrap.h 896 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * \file md_wrap.h
  3. *
  4. * \brief Message digest wrappers.
  5. *
  6. * \warning This in an internal header. Do not include directly.
  7. *
  8. * \author Adriaan de Jong <[email protected]>
  9. */
  10. /*
  11. * Copyright The Mbed TLS Contributors
  12. * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  13. */
  14. #ifndef MBEDTLS_MD_WRAP_H
  15. #define MBEDTLS_MD_WRAP_H
  16. #include "mbedtls/build_info.h"
  17. #include "mbedtls/md.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /**
  22. * Message digest information.
  23. * Allows message digest functions to be called in a generic way.
  24. */
  25. struct mbedtls_md_info_t {
  26. /** Digest identifier */
  27. mbedtls_md_type_t type;
  28. /** Output length of the digest function in bytes */
  29. unsigned char size;
  30. #if defined(MBEDTLS_MD_C)
  31. /** Block length of the digest function in bytes */
  32. unsigned char block_size;
  33. #endif
  34. };
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* MBEDTLS_MD_WRAP_H */