/* The function get algorithm from hash mask info. */
TPM_ALG_ID Tpm2GetAlgoFromHashMask(VOID)
/* The function get algorithm from hash mask info. */
TPM_ALG_ID Tpm2GetAlgoFromHashMask(VOID)
{
  UINT32  HashMask;
  UINTN   Index;
  HashMask = PcdGet32 (PcdTpm2HashMask);
  for (Index = 0; Index < sizeof (mTpm2HashMask)/sizeof (mTpm2HashMask[0]); Index++) {
    if (mTpm2HashMask[Index].Mask == HashMask) {
      return mTpm2HashMask[Index].AlgoId;
    }
  }
  return TPM_ALG_NULL;
}