]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLibNull/Hmac/CryptHmacSha1Null.c
CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Hmac / CryptHmacSha1Null.c
index 547aa484ea1647de91a79710402a8d1bb99cc779..e8c0f341b7d31d79ba5b9dbb0d3662685381fac5 100644 (file)
@@ -1,33 +1,13 @@
 /** @file\r
   HMAC-SHA1 Wrapper Implementation which does not provide real capabilities.\r
 \r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 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-SHA1 operations.\r
-  (NOTE: This API is deprecated.\r
-         Use HmacSha1New() / HmacSha1Free() for HMAC-SHA1 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
-HmacSha1GetContextSize (\r
-  VOID\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return 0;\r
-}\r
-\r
 /**\r
   Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA1 use.\r
 \r
@@ -65,12 +45,12 @@ HmacSha1Free (
 }\r
 \r
 /**\r
-  Initializes user-supplied memory pointed by HmacSha1Context as HMAC-SHA1 context for\r
-  subsequent use.\r
+  Set user-supplied key for subsequent use. It must be done before any\r
+  calling to HmacSha1Update().\r
 \r
   Return FALSE to indicate this interface is not supported.\r
 \r
-  @param[out]  HmacSha1Context  Pointer to HMAC-SHA1 context being initialized.\r
+  @param[out]  HmacSha1Context  Pointer to HMAC-SHA1 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 @@ HmacSha1Free (
 **/\r
 BOOLEAN\r
 EFIAPI\r
-HmacSha1Init (\r
+HmacSha1SetKey (\r
   OUT  VOID         *HmacSha1Context,\r
   IN   CONST UINT8  *Key,\r
   IN   UINTN        KeySize\r