CryptHmacMd5Null.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /** @file
  2. HMAC-MD5 Wrapper Implementation which does not provide real capabilities.
  3. Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include "InternalCryptLib.h"
  7. /**
  8. Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.
  9. (NOTE: This API is deprecated.
  10. Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)
  11. Return zero to indicate this interface is not supported.
  12. @retval 0 This interface is not supported.
  13. **/
  14. UINTN
  15. EFIAPI
  16. HmacMd5GetContextSize (
  17. VOID
  18. )
  19. {
  20. ASSERT (FALSE);
  21. return 0;
  22. }
  23. /**
  24. Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.
  25. Return NULL to indicate this interface is not supported.
  26. @retval NULL This interface is not supported.
  27. **/
  28. VOID *
  29. EFIAPI
  30. HmacMd5New (
  31. VOID
  32. )
  33. {
  34. ASSERT (FALSE);
  35. return NULL;
  36. }
  37. /**
  38. Release the specified HMAC_CTX context.
  39. This function will do nothing.
  40. @param[in] HmacMd5Ctx Pointer to the HMAC_CTX context to be released.
  41. **/
  42. VOID
  43. EFIAPI
  44. HmacMd5Free (
  45. IN VOID *HmacMd5Ctx
  46. )
  47. {
  48. ASSERT (FALSE);
  49. return;
  50. }
  51. /**
  52. Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for
  53. subsequent use.
  54. Return FALSE to indicate this interface is not supported.
  55. @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.
  56. @param[in] Key Pointer to the user-supplied key.
  57. @param[in] KeySize Key size in bytes.
  58. @retval FALSE This interface is not supported.
  59. **/
  60. BOOLEAN
  61. EFIAPI
  62. HmacMd5Init (
  63. OUT VOID *HmacMd5Context,
  64. IN CONST UINT8 *Key,
  65. IN UINTN KeySize
  66. )
  67. {
  68. ASSERT (FALSE);
  69. return FALSE;
  70. }
  71. /**
  72. Makes a copy of an existing HMAC-MD5 context.
  73. Return FALSE to indicate this interface is not supported.
  74. @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.
  75. @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.
  76. @retval FALSE This interface is not supported.
  77. **/
  78. BOOLEAN
  79. EFIAPI
  80. HmacMd5Duplicate (
  81. IN CONST VOID *HmacMd5Context,
  82. OUT VOID *NewHmacMd5Context
  83. )
  84. {
  85. ASSERT (FALSE);
  86. return FALSE;
  87. }
  88. /**
  89. Digests the input data and updates HMAC-MD5 context.
  90. Return FALSE to indicate this interface is not supported.
  91. @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
  92. @param[in] Data Pointer to the buffer containing the data to be digested.
  93. @param[in] DataSize Size of Data buffer in bytes.
  94. @retval FALSE This interface is not supported.
  95. **/
  96. BOOLEAN
  97. EFIAPI
  98. HmacMd5Update (
  99. IN OUT VOID *HmacMd5Context,
  100. IN CONST VOID *Data,
  101. IN UINTN DataSize
  102. )
  103. {
  104. ASSERT (FALSE);
  105. return FALSE;
  106. }
  107. /**
  108. Completes computation of the HMAC-MD5 digest value.
  109. Return FALSE to indicate this interface is not supported.
  110. @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
  111. @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest
  112. value (16 bytes).
  113. @retval FALSE This interface is not supported.
  114. **/
  115. BOOLEAN
  116. EFIAPI
  117. HmacMd5Final (
  118. IN OUT VOID *HmacMd5Context,
  119. OUT UINT8 *HmacValue
  120. )
  121. {
  122. ASSERT (FALSE);
  123. return FALSE;
  124. }