cleanup, docs

This commit is contained in:
root
2026-06-16 23:02:45 +00:00
parent ea08d5f28b
commit b8b56cf3dd
160 changed files with 1076 additions and 511 deletions
+11 -4
View File
@@ -1,10 +1,17 @@
# sha256
:sig
String sha256(String data)
:params
data : bytes to hash
return value : the raw 32-byte SHA-256 digest
Returns the raw 32-byte SHA-256 digest for `data`. Use `sha256_hex()` for printable lowercase hex.
:content
Returns the SHA-256 digest of `data` as raw bytes. Prefer `sha256_hex()` when you need printable text; use the raw form when feeding the digest into other binary operations.
:example
print(sha256("hello").length(), "\n");
print(sha256("abc").length(), " raw bytes, hex = ", sha256_hex("abc"), "\n");
:see
>noise
>sys
sha256_hex
hmac_sha256