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
typeIncrementalParallelHash.ShakeTypeThe SHAKE variant used for the ParallelHash construction.
blockSizeBytesintThe block size in bytes.
customizationReadOnlySpan<byte>Optional customization string S (default: empty).
Fields
DefaultBlockSizeBytes
The default block size in bytes (4 MiB).
public const int DefaultBlockSizeBytes = 1048576
Field Value
Methods
Absorb(ReadOnlySpan<byte>)
Absorbs data into the ParallelHash instance.
public void Absorb(ReadOnlySpan<byte> data)
Parameters
dataReadOnlySpan<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)