gleamunison/crypto
Types
pub type CryptoError {
InvalidInput(reason: String)
}
Constructors
-
InvalidInput(reason: String)
Values
pub fn describe_error(error: CryptoError) -> String
The one place a CryptoError becomes a user sentence. Rendering belongs with the type, not at each call site — inspect output must never reach a user.
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).