package core:crypto/legacy/sha1
Overview
package sha1 implements the SHA1 hash algorithm.
WARNING: The SHA1 algorithm is known to be insecure and should only be used for interoperating with legacy applications.
See: https://eprint.iacr.org/2017/190 https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf https://datatracker.ietf.org/doc/html/rfc3174
Index
Types (1)
Constants (2)
Variables (0)
This section is empty.
Procedure Groups (0)
This section is empty.
Types
Context ¶
Context :: struct { data: [64]u8, state: [5]u32, k: [4]u32, bitlen: u64, datalen: u32, is_initialized: bool, }
Context is a SHA1 instance.
Related Procedures With Parameters
Constants
Variables
This section is empty.
Procedures
final ¶
final finalizes the Context, writes the digest to hash, and calls reset on the Context.
Iff finalize_clone is set, final will work on a copy of the Context, which is useful for for calculating rolling digests.
reset ¶
reset :: proc(ctx: ^$T) {…}
reset sanitizes the Context. The Context must be re-initialized to be used again.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-17 21:11:00.942479500 +0000 UTC