hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 9899bc692e77c4848902f0947db1ac682176e393
parent 4f1dad5b834207164e02f125eccfaf19849486c3
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 24 Mar 2021 20:24:54 -0400

crypto::sha*: add docs

Diffstat:
Mcrypto/sha1/sha1.ha | 3+++
Mcrypto/sha256/sha256.ha | 1+
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/crypto/sha1/sha1.ha b/crypto/sha1/sha1.ha @@ -23,6 +23,9 @@ type digest = struct { ln: size, }; +// Creates a [hash::hash] which computes a SHA-1 hash. Note that this alogorithm +// is no longer considered secure. Where possible, applications are encouraged +// to use [sha256] or [sha512] instead. export fn sha1() *hash::hash = { let sha = alloc(digest { hash = hash::hash { diff --git a/crypto/sha256/sha256.ha b/crypto/sha256/sha256.ha @@ -39,6 +39,7 @@ type state = struct { ln: size, }; +// Creates a [hash::hash] which computes a SHA-256 hash. export fn sha256() *hash::hash = { let sha = alloc(state { hash = hash::hash {