use false_bottom::{Encode, FalseBottom, Fb128, FbKey}; fn main() { // Cipher Initialization let mut fb = Fb128::init(18, 9); // Encryption let msg = "This is a message"; let key = fb.add(msg.as_bytes()); // Export as base64 (Note the order!) let (cipher, keybase) = fb.to_base64(); // Or as raw bytes let key_exp = key.to_bytes(); // Import from base64 let fb_imp = Fb128::from_base64(&cipher, &keybase).unwrap(); // Or as raw bytes let key_imp = FbKey::from_bytes(&key_exp).unwrap(); // Decryption let decr = fb_imp.decrypt(&key_imp).unwrap(); assert_eq!(msg.as_bytes(), decr); }