Skip to main content

Module crypto

Module crypto 

Source
Expand description

Cryptographic operations for Seq

FFI entry points are grouped into per-primitive sub-modules and re-exported here so the flat public surface is unchanged.

§API

  • sha256, hmac-sha256, constant-time-eq — hash
  • random-bytes, uuid4, random-int — random
  • aes-gcm-encrypt, aes-gcm-decrypt — aes
  • pbkdf2-sha256 — pbkdf
  • ed25519-keypair, ed25519-sign, ed25519-verify — ed25519

Functions§

patch_seq_constant_time_eq⚠
Timing-safe string comparison
patch_seq_crypto_aes_gcm_decrypt⚠
Decrypt ciphertext using AES-256-GCM
patch_seq_crypto_aes_gcm_encrypt⚠
Encrypt plaintext using AES-256-GCM
patch_seq_crypto_ed25519_keypair⚠
Generate an Ed25519 keypair
patch_seq_crypto_ed25519_sign⚠
Sign a message with an Ed25519 private key
patch_seq_crypto_ed25519_verify⚠
Verify an Ed25519 signature
patch_seq_crypto_pbkdf2_sha256⚠
Derive a key from a password using PBKDF2-SHA256
patch_seq_hmac_sha256⚠
Compute HMAC-SHA256 of a message with a key
patch_seq_random_bytes⚠
Generate cryptographically secure random bytes
patch_seq_random_int⚠
Generate a cryptographically secure random integer in a range
patch_seq_sha256⚠
Compute SHA-256 hash of a string
patch_seq_uuid4⚠
Generate a UUID v4 (random)