/* This function will never return if the verification is failed. */
STATIC FV_HASH_INFO* GetHashInfo(IN EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI *StoredHashFvPpi, IN EFI_BOOT_MODE BootMode)
/* This function will never return if the verification is failed. */
STATIC FV_HASH_INFO* GetHashInfo(IN EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI *StoredHashFvPpi, IN EFI_BOOT_MODE BootMode)
{
  FV_HASH_INFO  *HashInfo;
  if ((StoredHashFvPpi->HashInfo.HashFlag & FV_HASH_FLAG_BOOT_MODE (BootMode)) != 0) {
    HashInfo = &StoredHashFvPpi->HashInfo;
  } else {
    HashInfo = NULL;
  }
  return HashInfo;
}