cleanup, docs
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
# hmac_sha256_hex
|
||||
:sig
|
||||
String hmac_sha256_hex(String key, String data)
|
||||
|
||||
:params
|
||||
key : secret key
|
||||
data : message to authenticate
|
||||
return value : the HMAC-SHA256 as a 64-character lowercase hex string
|
||||
|
||||
Returns the lowercase hexadecimal HMAC-SHA-256 digest.
|
||||
:content
|
||||
Computes an HMAC-SHA256 message authentication code and returns it as hex. Use it to sign tokens, cookies, and webhook payloads, then verify with `crypto_equal()` to avoid timing leaks.
|
||||
|
||||
:example
|
||||
print(hmac_sha256_hex("key", "data"), "\n");
|
||||
print(hmac_sha256_hex("key", "The quick brown fox jumps over the lazy dog"), "\n");
|
||||
|
||||
:see
|
||||
>noise
|
||||
>sys
|
||||
hmac_sha256
|
||||
sha256_hex
|
||||
crypto_equal
|
||||
|
||||
Reference in New Issue
Block a user