Skip to main content

Crate cryptkit

Crate cryptkit 

Source
Expand description

Cryptographic primitives for Rust.

Provides HMAC-SHA256, AES-GCM, constant-time comparison, SHA-256 hashing, and secure random byte generation — all with zeroize-on-drop for secrets.

§Quick Start

use cryptkit::hmac::{hmac_sign, hmac_verify};

let key = b"super-secret-key";
let message = b"hello world";

let tag = hmac_sign(key, message);
assert!(hmac_verify(key, message, &tag));

Modules§

aesaes-gcm
AES-256-GCM authenticated encryption and decryption.
hashhmac_sha256
SHA-256 hashing.
hmachmac_sha256
HMAC-SHA256 signing and verification with constant-time comparison.
random
Secure random byte generation.

Traits§

ConstantTimeEq
Re-export of constant-time comparison. An Eq-like trait that produces a Choice instead of a bool.