diff options
| author | ame <[email protected]> | 2024-03-26 13:36:42 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-03-26 13:36:42 -0500 |
| commit | b1f57a05f31a04b6d0dfbdfaf358ce8adfd45dda (patch) | |
| tree | 9121bda8e2fa09f13e7f4d78266ce755a69786e8 /docs | |
| parent | c6e8e66aa91bffa649e9192d3e4e0658d78d0ad6 (diff) | |
pretty:3
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/crypto.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/crypto.md b/docs/crypto.md index 06689d9..1f71f43 100644 --- a/docs/crypto.md +++ b/docs/crypto.md @@ -75,6 +75,19 @@ llib.crypto.sha512("meow") -- e88348269bad036160f0d9558b7c5de68163b50e1a6ce46e85 llib.crypto.sha512_t("meow", 224) -- would be sha512/224 - ad5e403e0d74532187f4e1665c7e705ab5eb3c2fe07ae73a3ff998b2 ``` +functions supporting updates (listed with %, see note above) can be used like so: + +```lua +obj = llib.crypto.adler32_init() +llib.crypto.adler32_update(obj, "meow") +local hash = llib.crypto.adler32_final(obj) --043c01b9 + +--or you can chain them! +obj = llib.crypto.adler32_init() +obj:update("meow") +hash = obj:final() --043c01b9s (the same) +``` + ## en/decoding all functions have 1 argument which is a string, unless noted otherwise |
