pub struct Cryptographer { /* private fields */ }
Implementations§
Source§impl Cryptographer
impl Cryptographer
pub fn new(salt: Bits256, secret_key: &str, pbkdf2_iterations: u32) -> Self
pub fn encrypt( &self, plaintext: &[u8], may_compress: bool, ) -> Result<EncryptedPayload, WebtermError>
pub fn decrypt( &self, ciphertext: &[u8], iv: &Bits96, compressed: bool, ) -> Result<Vec<u8>, WebtermError>
Auto Trait Implementations§
impl !Freeze for Cryptographer
impl RefUnwindSafe for Cryptographer
impl Send for Cryptographer
impl Sync for Cryptographer
impl Unpin for Cryptographer
impl UnwindSafe for Cryptographer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more