pub struct DigestFrame {
pub algorithm: DigestAlg,
pub digest: Vec<u8>,
}Expand description
Digest frame decoded from plaintext.
Fields§
§algorithm: DigestAlg§digest: Vec<u8>Implementations§
Source§impl DigestFrame
[ alg_id: u16 BE ][ digest_len: u16 BE ][ digest bytes ]
impl DigestFrame
[ alg_id: u16 BE ][ digest_len: u16 BE ][ digest bytes ]
pub fn new(alg: DigestAlg, digest: Vec<u8>) -> Self
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode into wire format (plaintext): [ alg_id: u16 BE ][ digest_len: u16 BE ][ digest bytes ]
Sourcepub fn decode(plaintext: &[u8]) -> Result<Self, DigestError>
pub fn decode(plaintext: &[u8]) -> Result<Self, DigestError>
Wire format (plaintext): [ alg_id: u16 BE ][ digest_len: u16 BE ][ digest bytes ]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DigestFrame
impl RefUnwindSafe for DigestFrame
impl Send for DigestFrame
impl Sync for DigestFrame
impl Unpin for DigestFrame
impl UnsafeUnpin for DigestFrame
impl UnwindSafe for DigestFrame
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