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
+13 -4
View File
@@ -1,10 +1,19 @@
# hmac_sha256
:sig
String hmac_sha256(String key, String data)
:params
key : secret key
data : message to authenticate
return value : the raw 32-byte HMAC-SHA256
Returns the raw 32-byte HMAC-SHA-256 digest for `data` keyed by `key`.
:content
Computes an HMAC-SHA256 and returns it as raw bytes. Prefer `hmac_sha256_hex()` for printable signatures; use the raw form for binary protocols.
:example
print(hmac_sha256("key", "data").length(), "\n");
print(hmac_sha256("key", "message").length(), " raw bytes, hex = ", hmac_sha256_hex("key", "message"), "\n");
:see
>noise
>sys
hmac_sha256_hex
sha256
crypto_equal