Low-Level Interface

One-Shot Digests

CryptographicHashFunctions.digestFunction
digest(algoid, data[; provider, kwargs...])

Return the digest of data computed with the hash algorithm algoid.

digest(algoid, data, len[; provider, kwargs...])

Return the first len bytes of the digest of data computed with the XOF algorithm algoid.

Hash Contexts

CryptographicHashFunctions.contextFunction
context(algoid[; provider])

Return a new hash context for the algorithm algoid.

context(algoid, data[; provider, kwargs...])

Return a new hash context for the algorithm algoid and initialize it with data.

CryptographicHashFunctions.reset!Function
reset!(ctx)

Reset the state of the hash context ctx. Afterwards, ctx can be used in the same way as a freshly created hash context with the same associated algorithm.

CryptographicHashFunctions.update!Function
update!(obj, data[; provider, kwargs...])

Feed data into the hash context or HMAC object obj.

The argument data can be of type AbstractVector{UInt8}, AbstractString, IO, or any other type that can be collected into a vector of bytes.

When reading data of type IO, the buffer size can be set with the optional keyword argument buffersize.

CryptographicHashFunctions.digest!Function
digest!(obj)

Return the digest for the HMAC object or hash context obj of a hash algorithm.

Unless reset! is called before, further calls to update! or digest! are not allowed.

digest!(ctx, len)

Return the next len bytes of the digest for the hash context ctx of an XOF algorithm.

Unless reset! is called before, further calls to update! are not allowed. If the provider does not support streaming, further calls to digest! are forbidden, too.