pub struct Plaintext(/* private fields */);Expand description
Accounted plaintext which wipes initialized storage before deallocation. It owns no backend and never implements Debug/Clone. Growth and copies must use the supplied current Reader execution before wrapping the resulting owner.
Implementations§
Source§impl Plaintext
impl Plaintext
Sourcepub fn copy_from(bytes: &[u8], query: &Reader<'_>) -> Result<Self>
pub fn copy_from(bytes: &[u8], query: &Reader<'_>) -> Result<Self>
Copies bytes into current accounted storage after funding the eventual wipe. Copy/refusal paths keep a wiping guard from the first stored byte.
Sourcepub fn copy_octets(octets: &Octets<'_>, query: &Reader<'_>) -> Result<Self>
pub fn copy_octets(octets: &Octets<'_>, query: &Reader<'_>) -> Result<Self>
Copies exact logical octets once for in-place decryption. Metadata, capacity, copies and the eventual wipe are paid by the producing query.
Sourcepub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
Mutable existing bytes for in-place cipher operations, without growth.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Plaintext
impl RefUnwindSafe for Plaintext
impl Send for Plaintext
impl Sync for Plaintext
impl Unpin for Plaintext
impl UnsafeUnpin for Plaintext
impl UnwindSafe for Plaintext
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