encipher
A fast session-data cipher for Rust.
Designed specifically for encrypting non-critical session data such as user IDs and usernames. Uses a keyed substitution cipher with rotating lookup tables seeded via ChaCha20, and HMAC-SHA256 for data integrity verification.
Not intended as a general-purpose cryptographic library. Not suitable for sensitive data such as passwords or financial information.
Installation
[]
= "0.1.0"
Usage
use Encipher;
let step = 7; // controls the substitution offset (1..=255)
let cipher = new.unwrap;
let token = cipher.encrypt;
let decoded = cipher.decrypt.unwrap;
assert_eq!;
Using an Environment Variable
use Encipher;
// Set APP_KEY=12345 in your environment
let cipher = new.unwrap;
License
Licensed under the Apache License 2.0.