/* This function performs the CSHAKE-256 message digest of a given data buffer, and places the digest value into the specified memory. */
BOOLEAN EFIAPI CShake256HashAll(IN CONST VOID *Data, IN UINTN DataSize, IN UINTN OutputLen, IN CONST VOID *Name, IN UINTN NameLen, IN CONST VOID *Customization, IN UINTN CustomizationLen, OUT UINT8 *HashValue)
/* This function performs the CSHAKE-256 message digest of a given data buffer, and places the digest value into the specified memory. */
BOOLEAN EFIAPI CShake256HashAll(IN CONST VOID *Data, IN UINTN DataSize, IN UINTN OutputLen, IN CONST VOID *Name, IN UINTN NameLen, IN CONST VOID *Customization, IN UINTN CustomizationLen, OUT UINT8 *HashValue)
{
  BOOLEAN         Status;
  Keccak1600_Ctx  Ctx;
  if (HashValue == NULL) {
    return FALSE;
  }
  if ((Data == NULL) && (DataSize != 0)) {
    return FALSE;
  }
  Status = CShake256Init (&Ctx, OutputLen, Name, NameLen, Customization, CustomizationLen);
  if (!Status) {
    return FALSE;
  }
  Status = CShake256Update (&Ctx, Data, DataSize);
  if (!Status) {
    return FALSE;
  }
  return CShake256Final (&Ctx, HashValue);
}