]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Include/Library/HashLib.h
SecurityPkg: introduce the SM3 digest algorithm
[mirror_edk2.git] / SecurityPkg / Include / Library / HashLib.h
index b85756961e2accaa24d7511a555ae20917106766..6ad960ad70ee9dd8e1138ad31b5c13eff4062b22 100644 (file)
@@ -1,16 +1,10 @@
 /** @file\r
-  Ihis library abstract TPM2 hash calculation.\r
+  This library abstract TPM2 hash calculation.\r
   The platform can choose multiply hash, while caller just need invoke these API.\r
   Then all hash value will be returned and/or extended.\r
 \r
-Copyright (c) 2013, 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -19,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Uefi.h>\r
 #include <Protocol/Hash.h>\r
-\r
+#include <IndustryStandard/Tpm20.h>\r
 typedef UINTN  HASH_HANDLE;\r
 \r
 /**\r
@@ -143,6 +137,10 @@ EFI_STATUS
 #define HASH_ALGORITHM_SHA256_GUID  EFI_HASH_ALGORITHM_SHA256_GUID\r
 #define HASH_ALGORITHM_SHA384_GUID  EFI_HASH_ALGORITHM_SHA384_GUID\r
 #define HASH_ALGORITHM_SHA512_GUID  EFI_HASH_ALGORITHM_SHA512_GUID\r
+#define HASH_ALGORITHM_SM3_256_GUID \\r
+  { \\r
+    0x251C7818, 0x0DBF, 0xE619, { 0x7F, 0xC2, 0xD6, 0xAC, 0x43, 0x42, 0x7D, 0xA3 } \\r
+  }\r
 \r
 typedef struct {\r
   EFI_GUID                           HashGuid;\r