sha1
nimony/lib/std/sha1.nim
SHA-1 (Secure Hash Algorithm 1), 160-bit message digest. Minimal port from Nim's checksums/sha1 — only the bits used by nifchecksums / nifindexes are provided. Byte-swap helpers are inlined since Nimony doesn't have std/endians.
type Sha1Digest = array[0..19, uint8]type SecureHash = distinct array[0..19, uint8]type Sha1State = object count: int64 state: array[0..4, uint32] buf: array[0..63, uint8]
proc newSha1State(): Sha1Stateproc update(ctx: var Sha1State; data: openArray)proc finalize(ctx: var Sha1State): array[0..19, uint8]proc $(self: SecureHash): string