Module eco.hash.sha1

SHA1 hash functions.

Provides one-shot hashing via sum and incremental hashing via new. The digest is returned as raw binary bytes (20 bytes).

Functions

sum (data) Compute SHA1 digest of the given data.
new () Create a new incremental SHA1 context.

Class sha1

sha1:update (data) Update digest with more data.
sha1:final () Finalize and return digest.


Functions

sum (data)
Compute SHA1 digest of the given data.

Parameters:

Returns:

    string Raw 20-byte digest.
new ()
Create a new incremental SHA1 context.

Returns:

    sha1 ctx

Class sha1

sha1 object created by new.
sha1:update (data)
Update digest with more data.

Parameters:

sha1:final ()
Finalize and return digest.

Returns:

    string Raw 20-byte digest.
generated by LDoc 1.5.0 Last updated 2026-04-09 14:48:22