pub struct CryptoHeader {
pub transformation_id: CryptoTransformIdentifier,
pub session_id: [u8; 4],
pub init_vector_suffix: [u8; 8],
}Expand description
Spec §10.5.2.3 CryptoHeader:
struct CryptoHeader {
CryptoTransformIdentifier transformation_id;
CryptoSessionId session_id; // 4 byte
CryptoInitVectorSuffix init_vector_suffix; // 8 byte
};Total 8 + 4 + 8 = 20 Bytes.
Fields§
§transformation_id: CryptoTransformIdentifierTransform-Identifier.
session_id: [u8; 4]Session-Id (vom Plugin vergeben, 4 Byte).
init_vector_suffix: [u8; 8]IV-Suffix (8 Byte). Volles IV = session_id || init_vector_suffix.
Implementations§
Source§impl CryptoHeader
impl CryptoHeader
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, &'static str>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, &'static str>
Trait Implementations§
Source§impl Clone for CryptoHeader
impl Clone for CryptoHeader
Source§fn clone(&self) -> CryptoHeader
fn clone(&self) -> CryptoHeader
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 CryptoHeader
impl Debug for CryptoHeader
Source§impl PartialEq for CryptoHeader
impl PartialEq for CryptoHeader
Source§fn eq(&self, other: &CryptoHeader) -> bool
fn eq(&self, other: &CryptoHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CryptoHeader
impl Eq for CryptoHeader
impl StructuralPartialEq for CryptoHeader
Auto Trait Implementations§
impl Freeze for CryptoHeader
impl RefUnwindSafe for CryptoHeader
impl Send for CryptoHeader
impl Sync for CryptoHeader
impl Unpin for CryptoHeader
impl UnsafeUnpin for CryptoHeader
impl UnwindSafe for CryptoHeader
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