From 3feea54eae33a6689bedf1e023edeb219faa76d6 Mon Sep 17 00:00:00 2001 From: Amol N Sukerkar Date: Mon, 3 Feb 2020 10:18:50 -0800 Subject: CryptoPkg/BaseHashApiLib: Implement Unified Hash Calculation API https://bugzilla.tianocore.org/show_bug.cgi?id=2151 This commit introduces a Unified Hash API to calculate hash using a hashing algorithm specified by the PCD, PcdHashApiLibPolicy. This library interfaces with the various hashing API, such as, MD4, MD5, SHA1, SHA256, SHA512 and SM3_256 implemented in BaseCryptLib. The user can calculate the desired hash by setting PcdHashApiLibPolicy to appropriate value. This feature is documented in the Bugzilla, https://bugzilla.tianocore.org/show_bug.cgi?id=2151. Cc: Jiewen Yao Cc: Jian J Wang Cc: Michael D Kinney Signed-off-by: Amol N Sukerkar Reviewed-by: Michael D Kinney --- CryptoPkg/CryptoPkg.uni | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'CryptoPkg/CryptoPkg.uni') diff --git a/CryptoPkg/CryptoPkg.uni b/CryptoPkg/CryptoPkg.uni index beb0036ef5..0dae4c4045 100644 --- a/CryptoPkg/CryptoPkg.uni +++ b/CryptoPkg/CryptoPkg.uni @@ -4,7 +4,7 @@ // This Package provides cryptographic-related libraries for UEFI security modules. // It also provides a test application to test libraries. // -// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -17,3 +17,19 @@ +#string STR_gEfiCryptoPkgTokenSpaceGuid_PcdHashApiLibPolicy_PROMPT #language en-US "HASH algorithm to calculate hash" + +#string STR_gEfiCryptoPkgTokenSpaceGuid_PcdHashApiLibPolicy_HELP #language en-US "This PCD indicates the HASH algorithm to calculate hash of data.

\n" + "Based on the value set, the required algorithm is chosen to calculate\n" + "the hash of data.
\n" + "The default hashing algorithm for BaseHashApiLib is set to SHA256.
\n" + "0x00000001 - MD4.
\n" + "0x00000002 - MD5.
\n" + "0x00000003 - SHA1.
\n" + "0x00000004 - SHA256.
\n" + "0x00000005 - SHA384.
\n" + "0x00000006 - SHA512.
\n" + "0x00000007 - SM3.
" + + + -- cgit v1.2.3