Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
fs:crypto 命名空间下的 hash/base64/unicode/hex 工具
import 'fs:crypto'
::
hash
base64
unicode
\uXXXX
hex
md5
hash::md5(text)
sha1
hash::sha1(text)
sha256
hash::sha256(text)
sha384
hash::sha384(text)
sha512
hash::sha512(text)
token = hash::sha256(&userId + ":" + &nonce)
encode
base64::encode(text,charset?)
charset
UTF-8
decode
base64::decode(data,charset?)
secret = base64::encode(&json, 'UTF-8') original = base64::decode(&secret)
unicode::encode(text)
unicode::decode(text)
escaped = unicode::encode('你好 Fluxon') restored = unicode::decode(&escaped)
hex::*
hex::encode(text)
hex::decode(hexString)
payload = hex::encode('OK') # => 4f4b hex::decode(&payload) # => OK