pub struct Entry {
pub header: [u8; 1024],
pub salt: [u8; 22],
pub nonce: [u8; 12],
pub ciphertext: Vec<u8>,
}Fields§
§header: [u8; 1024]§salt: [u8; 22]§nonce: [u8; 12]§ciphertext: Vec<u8>Implementations§
Source§impl Entry
impl Entry
Sourcepub fn encrypt(value: &[u8], header: &HeaderBinaryV0, password: &str) -> Self
pub fn encrypt(value: &[u8], header: &HeaderBinaryV0, password: &str) -> Self
§Panics
Panics when any of the values exceed natural limitations
Sourcepub fn decrypt(&self, password: &str) -> EntryUnlocked
pub fn decrypt(&self, password: &str) -> EntryUnlocked
§Panics
Panics when the password is wrong
Sourcepub fn from_bytes(file: &[u8]) -> Self
pub fn from_bytes(file: &[u8]) -> Self
§Panics
Panics when the file is too short to be split
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
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