pub struct FusedShellEnvelope {
pub version: u8,
pub preset: FusedPreset,
pub chunk_size: u32,
pub nonce: [u8; 12],
pub payload: Vec<u8>,
pub tag: [u8; 16],
}Expand description
Serialized fused shell envelope.
Fields§
§version: u8Envelope version.
preset: FusedPresetFused preset id.
chunk_size: u32Effective chunk size.
nonce: [u8; 12]Shell nonce.
payload: Vec<u8>Shell-transformed bytes.
tag: [u8; 16]Truncated authentication tag.
Implementations§
Source§impl FusedShellEnvelope
impl FusedShellEnvelope
Sourcepub fn to_unsigned_bytes(&self) -> Vec<u8> ⓘ
pub fn to_unsigned_bytes(&self) -> Vec<u8> ⓘ
Serialize the envelope without the trailing tag.
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Parse a serialized fused shell envelope.
Sourcepub fn info(&self) -> FusedShellInfo
pub fn info(&self) -> FusedShellInfo
Return lightweight envelope metadata.
Trait Implementations§
Source§impl Clone for FusedShellEnvelope
impl Clone for FusedShellEnvelope
Source§fn clone(&self) -> FusedShellEnvelope
fn clone(&self) -> FusedShellEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FusedShellEnvelope
impl Debug for FusedShellEnvelope
Source§impl<'de> Deserialize<'de> for FusedShellEnvelope
impl<'de> Deserialize<'de> for FusedShellEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FusedShellEnvelope
impl RefUnwindSafe for FusedShellEnvelope
impl Send for FusedShellEnvelope
impl Sync for FusedShellEnvelope
impl Unpin for FusedShellEnvelope
impl UnsafeUnpin for FusedShellEnvelope
impl UnwindSafe for FusedShellEnvelope
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