greenServeFEgreenServeFE

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

ExportRole
sha256sha256 exported function or value
sha512sha512 exported function or value
random_bytesrandom 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.

Related references

Module catalog · Native ABI · GSVE language