]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c
CryptoPkg: Clean up source files
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacMd5Null.c
index b4bdde0433a541fe51170256064ee4b989fe75fa..4ddd174168c1e57233b95538ca583d00e838ae69 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HMAC-MD5 Wrapper Implementation which does not provide real capabilities.\r
 \r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 /**\r
   Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.\r
+  (NOTE: This API is deprecated.\r
+         Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)\r
 \r
   Return zero to indicate this interface is not supported.\r
 \r
@@ -32,11 +34,47 @@ HmacMd5GetContextSize (
   return 0;\r
 }\r
 \r
+/**\r
+  Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.\r
+\r
+  Return NULL to indicate this interface is not supported.\r
+\r
+  @retval NULL  This interface is not supported.\r
+\r
+**/\r
+VOID *\r
+EFIAPI\r
+HmacMd5New (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return NULL;\r
+}\r
+\r
+/**\r
+  Release the specified HMAC_CTX context.\r
+\r
+  This function will do nothing.\r
+\r
+  @param[in]  HmacMd5Ctx  Pointer to the HMAC_CTX context to be released.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+HmacMd5Free (\r
+  IN  VOID  *HmacMd5Ctx\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return;\r
+}\r
+\r
 /**\r
   Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for\r
-  subsequent use. \r
+  subsequent use.\r
 \r
-  Return FALSE to indicate this interface is not supported.  \r
+  Return FALSE to indicate this interface is not supported.\r
 \r
   @param[out]  HmacMd5Context  Pointer to HMAC-MD5 context being initialized.\r
   @param[in]   Key             Pointer to the user-supplied key.\r