From 77e55cf4e283942766d6178eca375aeec055bff2 Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Wed, 14 Sep 2016 10:07:45 +0800 Subject: SecurityPkg/TPM2: Move GetDigestListSize() to Tpm2CommandLib This patch just moves function GetDigestListSize() from drivers to library and no functionality change. Cc: Chao B Zhang Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Signed-off-by: Star Zeng Reviewed-by: Chao Zhang --- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'SecurityPkg/Tcg/Tcg2Pei') diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index adc0350..c67cdff 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -190,31 +190,6 @@ EndofPeiSignalNotifyCallBack ( } /** - Get TPML_DIGEST_VALUES data size. - - @param[in] DigestList TPML_DIGEST_VALUES data. - - @return TPML_DIGEST_VALUES data size. -**/ -UINT32 -GetDigestListSize ( - IN TPML_DIGEST_VALUES *DigestList - ) -{ - UINTN Index; - UINT16 DigestSize; - UINT32 TotalSize; - - TotalSize = sizeof(DigestList->count); - for (Index = 0; Index < DigestList->count; Index++) { - DigestSize = GetHashSizeFromAlgo (DigestList->digests[Index].hashAlg); - TotalSize += sizeof(DigestList->digests[Index].hashAlg) + DigestSize; - } - - return TotalSize; -} - -/** Return if hash alg is supported in TPM PCR bank. @param HashAlg Hash algorithm to be checked. -- cgit v1.1