crypto library

crypto library

crypto library

Function

The crypto standard library is used to generate text digests, HMAC signatures and UUIDs.

API List

APIDescription
crypto.sha256Returns the SHA-256 lowercase hexadecimal digest.
crypto.sha512Returns the SHA-512 lowercase hexadecimal digest.
crypto.hmac_sha256Generate an HMAC-SHA256 signature using a key.
crypto.hmac_sha512Generate an HMAC-SHA512 signature using a key.
crypto.uuidGenerate UUID v4 string.
crypto.to_stringReturn the current input text.

Examples

Notes

- SHA and HMAC return lowercase hexadecimal strings.

- UUID uses v4 random UUID.