/* Updates the hash of a computation in progress by adding a message text. */
EFI_STATUS EFIAPI BaseCrypto2HashUpdate(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST UINT8 *Message, IN UINTN MessageSize)
/* Updates the hash of a computation in progress by adding a message text. */
EFI_STATUS EFIAPI BaseCrypto2HashUpdate(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST UINT8 *Message, IN UINTN MessageSize)
{
  EFI_HASH_INFO        *HashInfo;
  VOID                 *HashCtx;
  BOOLEAN              Ret;
  HASH2_INSTANCE_DATA  *Instance;
  if (This == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  Instance = HASH2_INSTANCE_DATA_FROM_THIS (This);
  if ((Instance->HashContext == NULL) || (Instance->HashInfoContext == NULL)) {
    return EFI_NOT_READY;
  }
  HashInfo = Instance->HashInfoContext;
  HashCtx  = Instance->HashContext;
  Ret = HashInfo->Update (HashCtx, Message, MessageSize);
  if (!Ret) {
    return EFI_OUT_OF_RESOURCES;
  }
  Instance->Updated = TRUE;
  return EFI_SUCCESS;
}