Table of Contents

Class IncrementalParallelHash

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

Provides incremental ParallelHash computation.

public sealed class IncrementalParallelHash : IDisposable
Inheritance
IncrementalParallelHash
Implements
Inherited Members

Constructors

IncrementalParallelHash(ShakeType, int, ReadOnlySpan<byte>)

Initializes a new instance of the IncrementalParallelHash class.

public IncrementalParallelHash(IncrementalParallelHash.ShakeType type = ShakeType.Shake128, int blockSizeBytes = 1048576, ReadOnlySpan<byte> customization = default)

Parameters

type IncrementalParallelHash.ShakeType

The SHAKE variant used for the ParallelHash construction.

blockSizeBytes int

The block size in bytes.

customization ReadOnlySpan<byte>

Optional customization string S (default: empty).

Fields

DefaultBlockSizeBytes

The default block size in bytes (4 MiB).

public const int DefaultBlockSizeBytes = 1048576

Field Value

int

Methods

Absorb(ReadOnlySpan<byte>)

Absorbs data into the ParallelHash instance.

public void Absorb(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The data to absorb.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Reset()

Resets the instance for reuse.

public void Reset()

Squeeze(Span<byte>)

Squeezes the final hash output.

public Span<byte> Squeeze(Span<byte> output)

Parameters

output Span<byte>

The span to receive the hash value.

Returns

Span<byte>

The output span containing the hash value.