pub struct TequelEncryption {
pub encrypted_data: String,
pub salt: String,
pub mac: String,
}Expand description
TequelEncryption is a struct that represent final encrypt, when TequelEncrypt is finish, it generates a TequelEncryption with MAC, Salt and Encrypted Data.
use tequel::encrypt::{ TequelEncrypt, TequelEncryption };
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut teq_encrypt: TequelEncrypt = TequelEncrypt::new();
// It returns a 'TequelEncryption'
let encrypted: TequelEncryption = teq_encrypt.encrypt("my_data".as_bytes(), "my_key_123")?;
Ok(())
}Fields§
§encrypted_data: String§salt: String§mac: StringTrait Implementations§
Source§impl Clone for TequelEncryption
impl Clone for TequelEncryption
Source§fn clone(&self) -> TequelEncryption
fn clone(&self) -> TequelEncryption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TequelEncryption
impl Debug for TequelEncryption
Source§impl Drop for TequelEncryption
impl Drop for TequelEncryption
Source§impl PartialEq for TequelEncryption
impl PartialEq for TequelEncryption
Source§impl Zeroize for TequelEncryption
impl Zeroize for TequelEncryption
impl Eq for TequelEncryption
impl StructuralPartialEq for TequelEncryption
Auto Trait Implementations§
impl Freeze for TequelEncryption
impl RefUnwindSafe for TequelEncryption
impl Send for TequelEncryption
impl Sync for TequelEncryption
impl Unpin for TequelEncryption
impl UnsafeUnpin for TequelEncryption
impl UnwindSafe for TequelEncryption
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