Skip to content

Digests

Bruce Wayne edited this page May 29, 2022 · 9 revisions

Create

IHash hasher = DigestUtils.Create(DigestType type);

DigestType

Supported:

public enum DigestType
{
    Sm3,
    Md5,
    Sha1,
    Sha224,
    Sha256,
    Sha384,
    Sha512,
    Crc32,
    Crc32C
}

Properties

Property Description
Name Name of the digest
Length Output length of the digest
BlockSize Block size of the digest

Methods

Method Description
void UpdateFinal(ReadOnlySpan<byte>, Span<byte>) Update the state, get the hash value and reset the state
void Update(ReadOnlySpan<byte>) Update the state
void GetHash(Span<byte>) Get the hash value and reset the state
void Reset() Reset the digest state
void Dispose() Releases the resources

Data format extensions

KDF

Symmetric crypto

Clone this wiki locally