pub struct AuthPlaintext { /* private fields */ }Expand description
Represents plaintext with an associated MAC.
Implementations§
Source§impl AuthPlaintext
impl AuthPlaintext
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Dumps the bytes.
NOTE: The MAC length is fixed in this implementation, so there is no immediate need to delimit the plaintext from the tag.
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Option<AuthPlaintext>
pub fn from_bytes(bytes: Vec<u8>) -> Option<AuthPlaintext>
Builds an AuthPlaintext struct from raw bytes. Returns None when the input is
too short.
Trait Implementations§
Source§impl Clone for AuthPlaintext
impl Clone for AuthPlaintext
Source§fn clone(&self) -> AuthPlaintext
fn clone(&self) -> AuthPlaintext
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 moreAuto Trait Implementations§
impl Freeze for AuthPlaintext
impl RefUnwindSafe for AuthPlaintext
impl Send for AuthPlaintext
impl Sync for AuthPlaintext
impl Unpin for AuthPlaintext
impl UnsafeUnpin for AuthPlaintext
impl UnwindSafe for AuthPlaintext
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