gleamunison/crypto

Types

pub type CryptoError {
  InvalidInput(reason: String)
}

Constructors

  • InvalidInput(reason: String)

Values

pub fn hmac_sha256(
  key: BitArray,
  data: BitArray,
) -> Result(BitArray, CryptoError)
pub fn secure_compare(a: BitArray, b: BitArray) -> Bool

Constant-time comparison (for tag verification).

pub fn to_hex(bytes: BitArray) -> String

Hex-encode raw bytes (no hashing).

✨ Search Document