]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c
CryptoPkg/BaseCryptLib: Retire HMAC MD5 algorithm
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacSha256Null.c
index f0a4420e276d5ed35d27acd1e9ffe605a4db3532..2e3cb3bdfef5b5053d12ecaec48ced966b55144c 100644 (file)
@@ -1,33 +1,13 @@
 /** @file\r
   HMAC-SHA256 Wrapper Implementation which does not provide real capabilities.\r
 \r
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include "InternalCryptLib.h"\r
 \r
-/**\r
-  Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations.\r
-  (NOTE: This API is deprecated.\r
-         Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.)\r
-\r
-  Return zero to indicate this interface is not supported.\r
-\r
-  @retval  0   This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacSha256GetContextSize (\r
-  VOID\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return 0;\r
-}\r
-\r
 /**\r
   Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use.\r
 \r
@@ -65,12 +45,12 @@ HmacSha256Free (
 }\r
 \r
 /**\r
-  Initializes user-supplied memory pointed by HmacSha256Context as HMAC-SHA256 context for\r
-  subsequent use.\r
+  Set user-supplied key for subsequent use. It must be done before any\r
+  calling to HmacSha256Update().\r
 \r
   Return FALSE to indicate this interface is not supported.\r
 \r
-  @param[out]  HmacSha256Context  Pointer to HMAC-SHA256 context being initialized.\r
+  @param[out]  HmacSha256Context  Pointer to HMAC-SHA256 context.\r
   @param[in]   Key                Pointer to the user-supplied key.\r
   @param[in]   KeySize            Key size in bytes.\r
 \r
@@ -79,7 +59,7 @@ HmacSha256Free (
 **/\r
 BOOLEAN\r
 EFIAPI\r
-HmacSha256Init (\r
+HmacSha256SetKey (\r
   OUT  VOID         *HmacSha256Context,\r
   IN   CONST UINT8  *Key,\r
   IN   UINTN        KeySize\r