hapi-iron-oxide
This module is made to be compatible with brc-dd/iron-webcrypto, which is the crate that backs vvo/iron-session. This allows APIs made in Rust be able to talk to Next.js.
Installation
Usage
Salt size can be customized from both const generics. The first generic argument is the salt size of the encryption algorithm (AES-256, AES-128). And the second generic argument is the salt size of integrity algorithm (SHA-256).
use *;
let password = "passwordpasswordpasswordpasswordpasswordpasswordpasswordpassword";
let data = "Hello World Please";
let sealed = ;
let unsealed = unseal;
assert_eq!;
The options struct can be customized like This
use *;
let password = "passwordpasswordpasswordpasswordpasswordpasswordpasswordpassword";
let data = "Hello World Please";
let options = new.ttl;
let sealed = ;
assert_eq!;
assert!;
Thank you
Thank you to
- brc-dd/iron-webcrypto
- iron-auth/iron-crypto for the ideas and implementation details.