[−][src]Struct pwbox::RestoredPwBox
Password-encrypted box restored after deserialization.
If the box may be corrupted, it may make sense to check its length
with the Self::len() method before opening the box.
Implementations
impl RestoredPwBox[src]
pub fn len(&self) -> usize[src]
Returns the byte size of the encrypted data stored in this box.
pub fn open_into(
&self,
output: impl AsMut<[u8]>,
password: impl AsRef<[u8]>
) -> Result<(), Error>[src]
&self,
output: impl AsMut<[u8]>,
password: impl AsRef<[u8]>
) -> Result<(), Error>
Decrypts the box into the specified container.
This method should be preferred to open() if the output type implements
zeroing on drop (e.g., cryptographic secrets from sodiumoxide).
pub fn open(&self, password: impl AsRef<[u8]>) -> Result<SensitiveData, Error>[src]
Decrypts the box and returns its contents. The returned container is zeroed on drop and derefs to a byte slice.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RestoredPwBox
impl !Send for RestoredPwBox
impl !Sync for RestoredPwBox
impl Unpin for RestoredPwBox
impl !UnwindSafe for RestoredPwBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,