diff options
-rw-r--r-- | SecurityPkg/Include/Library/Tpm2CommandLib.h | 16 | ||||
-rw-r--r-- | SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Include/Library/Tpm2CommandLib.h index 9a1dd8d8ac..85a4c65e02 100644 --- a/SecurityPkg/Include/Library/Tpm2CommandLib.h +++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h @@ -1007,6 +1007,22 @@ GetHashSizeFromAlgo ( );
/**
+ Return if hash alg is supported in HashAlgorithmMask.
+
+ @param HashAlg Hash algorithm to be checked.
+ @param HashAlgorithmMask Bitfield of allowed hash algorithms.
+
+ @retval TRUE Hash algorithm is supported.
+ @retval FALSE Hash algorithm is not supported.
+**/
+BOOLEAN
+EFIAPI
+IsHashAlgSupportedInHashAlgorithmMask(
+ IN TPMI_ALG_HASH HashAlg,
+ IN UINT32 HashAlgorithmMask
+ );
+
+/**
Copy TPML_DIGEST_VALUES into a buffer
@param[in,out] Buffer Buffer to hold TPML_DIGEST_VALUES.
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c index be95fd69b3..95d4f7c84c 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c @@ -175,6 +175,7 @@ CopyAuthSessionResponse ( @retval FALSE Hash algorithm is not supported.
**/
BOOLEAN
+EFIAPI
IsHashAlgSupportedInHashAlgorithmMask(
IN TPMI_ALG_HASH HashAlg,
IN UINT32 HashAlgorithmMask
|