CryptSha512Null.c 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /** @file
  2. SHA-384 and SHA-512 Digest Wrapper Implementations which does not provide real capabilities.
  3. Copyright (c) 2014 - 2016, 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 SHA-384 hash operations.
  9. Return zero to indicate this interface is not supported.
  10. @retval 0 This interface is not supported.
  11. **/
  12. UINTN
  13. EFIAPI
  14. Sha384GetContextSize (
  15. VOID
  16. )
  17. {
  18. ASSERT (FALSE);
  19. return 0;
  20. }
  21. /**
  22. Initializes user-supplied memory pointed by Sha384Context as SHA-384 hash context for
  23. subsequent use.
  24. Return FALSE to indicate this interface is not supported.
  25. @param[out] Sha384Context Pointer to SHA-384 context being initialized.
  26. @retval FALSE This interface is not supported.
  27. **/
  28. BOOLEAN
  29. EFIAPI
  30. Sha384Init (
  31. OUT VOID *Sha384Context
  32. )
  33. {
  34. ASSERT (FALSE);
  35. return FALSE;
  36. }
  37. /**
  38. Makes a copy of an existing SHA-384 context.
  39. Return FALSE to indicate this interface is not supported.
  40. @param[in] Sha384Context Pointer to SHA-384 context being copied.
  41. @param[out] NewSha384Context Pointer to new SHA-384 context.
  42. @retval FALSE This interface is not supported.
  43. **/
  44. BOOLEAN
  45. EFIAPI
  46. Sha384Duplicate (
  47. IN CONST VOID *Sha384Context,
  48. OUT VOID *NewSha384Context
  49. )
  50. {
  51. ASSERT (FALSE);
  52. return FALSE;
  53. }
  54. /**
  55. Digests the input data and updates SHA-384 context.
  56. Return FALSE to indicate this interface is not supported.
  57. @param[in, out] Sha384Context Pointer to the SHA-384 context.
  58. @param[in] Data Pointer to the buffer containing the data to be hashed.
  59. @param[in] DataSize Size of Data buffer in bytes.
  60. @retval FALSE This interface is not supported.
  61. **/
  62. BOOLEAN
  63. EFIAPI
  64. Sha384Update (
  65. IN OUT VOID *Sha384Context,
  66. IN CONST VOID *Data,
  67. IN UINTN DataSize
  68. )
  69. {
  70. ASSERT (FALSE);
  71. return FALSE;
  72. }
  73. /**
  74. Completes computation of the SHA-384 digest value.
  75. Return FALSE to indicate this interface is not supported.
  76. @param[in, out] Sha384Context Pointer to the SHA-384 context.
  77. @param[out] HashValue Pointer to a buffer that receives the SHA-384 digest
  78. value (48 bytes).
  79. @retval FALSE This interface is not supported.
  80. **/
  81. BOOLEAN
  82. EFIAPI
  83. Sha384Final (
  84. IN OUT VOID *Sha384Context,
  85. OUT UINT8 *HashValue
  86. )
  87. {
  88. ASSERT (FALSE);
  89. return FALSE;
  90. }
  91. /**
  92. Computes the SHA-384 message digest of a input data buffer.
  93. Return FALSE to indicate this interface is not supported.
  94. @param[in] Data Pointer to the buffer containing the data to be hashed.
  95. @param[in] DataSize Size of Data buffer in bytes.
  96. @param[out] HashValue Pointer to a buffer that receives the SHA-384 digest
  97. value (48 bytes).
  98. @retval FALSE This interface is not supported.
  99. **/
  100. BOOLEAN
  101. EFIAPI
  102. Sha384HashAll (
  103. IN CONST VOID *Data,
  104. IN UINTN DataSize,
  105. OUT UINT8 *HashValue
  106. )
  107. {
  108. ASSERT (FALSE);
  109. return FALSE;
  110. }
  111. /**
  112. Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations.
  113. Return zero to indicate this interface is not supported.
  114. @retval 0 This interface is not supported.
  115. **/
  116. UINTN
  117. EFIAPI
  118. Sha512GetContextSize (
  119. VOID
  120. )
  121. {
  122. ASSERT (FALSE);
  123. return 0;
  124. }
  125. /**
  126. Initializes user-supplied memory pointed by Sha512Context as SHA-512 hash context for
  127. subsequent use.
  128. Return FALSE to indicate this interface is not supported.
  129. @param[out] Sha512Context Pointer to SHA-512 context being initialized.
  130. @retval FALSE This interface is not supported.
  131. **/
  132. BOOLEAN
  133. EFIAPI
  134. Sha512Init (
  135. OUT VOID *Sha512Context
  136. )
  137. {
  138. ASSERT (FALSE);
  139. return FALSE;
  140. }
  141. /**
  142. Makes a copy of an existing SHA-512 context.
  143. Return FALSE to indicate this interface is not supported.
  144. @param[in] Sha512Context Pointer to SHA-512 context being copied.
  145. @param[out] NewSha512Context Pointer to new SHA-512 context.
  146. @retval FALSE This interface is not supported.
  147. **/
  148. BOOLEAN
  149. EFIAPI
  150. Sha512Duplicate (
  151. IN CONST VOID *Sha512Context,
  152. OUT VOID *NewSha512Context
  153. )
  154. {
  155. ASSERT (FALSE);
  156. return FALSE;
  157. }
  158. /**
  159. Digests the input data and updates SHA-512 context.
  160. Return FALSE to indicate this interface is not supported.
  161. @param[in, out] Sha512Context Pointer to the SHA-512 context.
  162. @param[in] Data Pointer to the buffer containing the data to be hashed.
  163. @param[in] DataSize Size of Data buffer in bytes.
  164. @retval FALSE This interface is not supported.
  165. **/
  166. BOOLEAN
  167. EFIAPI
  168. Sha512Update (
  169. IN OUT VOID *Sha512Context,
  170. IN CONST VOID *Data,
  171. IN UINTN DataSize
  172. )
  173. {
  174. ASSERT (FALSE);
  175. return FALSE;
  176. }
  177. /**
  178. Completes computation of the SHA-512 digest value.
  179. Return FALSE to indicate this interface is not supported.
  180. @param[in, out] Sha512Context Pointer to the SHA-512 context.
  181. @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest
  182. value (64 bytes).
  183. @retval FALSE This interface is not supported.
  184. **/
  185. BOOLEAN
  186. EFIAPI
  187. Sha512Final (
  188. IN OUT VOID *Sha512Context,
  189. OUT UINT8 *HashValue
  190. )
  191. {
  192. ASSERT (FALSE);
  193. return FALSE;
  194. }
  195. /**
  196. Computes the SHA-512 message digest of a input data buffer.
  197. Return FALSE to indicate this interface is not supported.
  198. @param[in] Data Pointer to the buffer containing the data to be hashed.
  199. @param[in] DataSize Size of Data buffer in bytes.
  200. @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest
  201. value (64 bytes).
  202. @retval FALSE This interface is not supported.
  203. **/
  204. BOOLEAN
  205. EFIAPI
  206. Sha512HashAll (
  207. IN CONST VOID *Data,
  208. IN UINTN DataSize,
  209. OUT UINT8 *HashValue
  210. )
  211. {
  212. ASSERT (FALSE);
  213. return FALSE;
  214. }