SecurityPkg/TPM2: Move CopyDigestListToBuffer() to Tpm2CommandLib
This patch just moves function CopyDigestListToBuffer() from drivers to library with HashAlgorithmMask parameter added to make the interface more applicable. The related function IsHashAlgSupportedInHashAlgorithmMask() is also moved from drivers to library as internal function. Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
This commit is contained in:
@@ -988,6 +988,23 @@ GetHashSizeFromAlgo (
|
||||
IN TPMI_ALG_HASH HashAlgo
|
||||
);
|
||||
|
||||
/**
|
||||
Copy TPML_DIGEST_VALUES into a buffer
|
||||
|
||||
@param[in,out] Buffer Buffer to hold TPML_DIGEST_VALUES.
|
||||
@param[in] DigestList TPML_DIGEST_VALUES to be copied.
|
||||
@param[in] HashAlgorithmMask HASH bits corresponding to the desired digests to copy.
|
||||
|
||||
@return The end of buffer to hold TPML_DIGEST_VALUES.
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
CopyDigestListToBuffer(
|
||||
IN OUT VOID *Buffer,
|
||||
IN TPML_DIGEST_VALUES *DigestList,
|
||||
IN UINT32 HashAlgorithmMask
|
||||
);
|
||||
|
||||
/**
|
||||
Get TPML_DIGEST_VALUES data size.
|
||||
|
||||
|
Reference in New Issue
Block a user