pub struct Crypto { /* private fields */ }Implementations§
Source§impl Crypto
impl Crypto
pub fn new(seed: u32) -> Self
pub fn set_key(&mut self, seed: u32)
pub fn encrypt(&self, plain_text: &str) -> Result<Vec<u8>, CryptoError>
pub fn decrypt(&self, cipher_text: &[u8]) -> Result<String, CryptoError>
pub fn prepare_challenge_response( &mut self, key: &str, ) -> Result<String, CryptoError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Crypto
impl RefUnwindSafe for Crypto
impl Send for Crypto
impl Sync for Crypto
impl Unpin for Crypto
impl UnwindSafe for Crypto
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