Table of Contents

Class KeccakHashCore

Namespace
CryptoHives.Foundation.Security.Cryptography.Hash
Assembly
CryptoHives.Foundation.Security.Cryptography.dll

Base class for fixed-length Keccak-based hash algorithms (SHA3, Keccak).

public abstract class KeccakHashCore : KeccakCore, ICryptoTransform, IDisposable, IResettable
Inheritance
KeccakHashCore
Implements
Derived
Inherited Members

Remarks

This base class provides common sponge construction logic for all fixed-length Keccak variants, eliminating code duplication across SHA3-224, SHA3-256, SHA3-384, SHA3-512, Keccak-256, Keccak-384, and Keccak-512.

Methods

TryHashFinal(Span<byte>, out int)

When overridden in a derived class, finalizes the hash computation and writes the result into the provided buffer.

protected override bool TryHashFinal(Span<byte> destination, out int bytesWritten)

Parameters

destination Span<byte>

The target buffer to write the hash to.

bytesWritten int

The number of bytes written into the buffer.

Returns

bool

true if the destination buffer was large enough; otherwise false.

Exceptions

ObjectDisposedException

Thrown when the instance has been disposed.