Documentation home / Native Module API
Native Module API
Cryptographic Functions
SHA-256 and SHA-512 digests and secure random bytes.
Purpose
SHA-256 and SHA-512 digests and secure random bytes.
Exports registered by the module initializer
| Export | Role |
|---|---|
sha256 | sha256 exported function or value |
sha512 | sha512 exported function or value |
random_bytes | random bytes exported function or value |
Usage example
import gs_crypto;
print(gs_crypto.sha256("greenServeFE"));
print(gs_crypto.random_bytes(16));Requires OpenSSL libcrypto. random_bytes(count) accepts 1–4096 bytes and returns lowercase hexadecimal.
greenServeFE