Expand description
Cryptographic operations for Seq
These functions are exported with C ABI for LLVM codegen to call.
§API
# SHA-256 hashing
"hello" crypto.sha256 # ( String -- String ) hex digest
# HMAC-SHA256 for webhook verification
"message" "secret" crypto.hmac-sha256 # ( String String -- String ) hex signature
# Timing-safe comparison
sig1 sig2 crypto.constant-time-eq # ( String String -- Bool )
# Secure random bytes
32 crypto.random-bytes # ( Int -- String ) hex-encoded random bytes
# UUID v4
crypto.uuid4 # ( -- String ) "550e8400-e29b-41d4-a716-446655440000"Functions§
- patch_
seq_ ⚠constant_ time_ eq - Timing-safe string comparison
- patch_
seq_ ⚠hmac_ sha256 - Compute HMAC-SHA256 of a message with a key
- patch_
seq_ ⚠random_ bytes - Generate cryptographically secure random bytes
- patch_
seq_ ⚠sha256 - Compute SHA-256 hash of a string
- patch_
seq_ ⚠uuid4 - Generate a UUID v4 (random)