pub struct LockedBuffer { /* private fields */ }Expand description
Arc-wrapped, Mutex-guarded SecureBuffer for sharing across threads.
Implementations§
Source§impl LockedBuffer
impl LockedBuffer
Sourcepub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>
pub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>
Create from an existing byte slice (copies into locked memory).
pub fn freeze(&self) -> Result<()>
pub fn melt(&self) -> Result<()>
pub fn scramble(&self) -> Result<()>
pub fn wipe(&self)
Sourcepub fn bytes_zeroizing(&self) -> Zeroizing<Vec<u8>>
pub fn bytes_zeroizing(&self) -> Zeroizing<Vec<u8>>
Copy contents to a Zeroizing heap allocation.
pub fn size(&self) -> usize
Trait Implementations§
Source§impl Debug for LockedBuffer
impl Debug for LockedBuffer
Source§impl Drop for LockedBuffer
impl Drop for LockedBuffer
Auto Trait Implementations§
impl Freeze for LockedBuffer
impl RefUnwindSafe for LockedBuffer
impl Send for LockedBuffer
impl Sync for LockedBuffer
impl Unpin for LockedBuffer
impl UnsafeUnpin for LockedBuffer
impl UnwindSafe for LockedBuffer
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