pub struct ProtectedHeader {
pub object_id: [u8; 32],
pub recipients: Vec<RecipientStanza>,
pub encrypted_metadata: Vec<u8>,
pub signatures: Vec<SignatureStanza>,
}Fields§
§object_id: [u8; 32]§recipients: Vec<RecipientStanza>§encrypted_metadata: Vec<u8>§signatures: Vec<SignatureStanza>Occupies the slot reserved as an empty array in v0.1. Empty here encodes byte-for-byte as a v0.1 header, which is what keeps old files readable.
Implementations§
Source§impl ProtectedHeader
impl ProtectedHeader
pub fn encode(&self) -> Result<Vec<u8>, FormatError>
Sourcepub fn signing_base(&self) -> Result<Vec<u8>, FormatError>
pub fn signing_base(&self) -> Result<Vec<u8>, FormatError>
The exact bytes a signature covers: the header with the signature slot empty. Signing the slot that holds the signature would be circular.
pub fn decode(bytes: &[u8]) -> Result<Self, FormatError>
Trait Implementations§
Source§impl Clone for ProtectedHeader
impl Clone for ProtectedHeader
Source§fn clone(&self) -> ProtectedHeader
fn clone(&self) -> ProtectedHeader
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 ProtectedHeader
impl Debug for ProtectedHeader
impl Eq for ProtectedHeader
Source§impl PartialEq for ProtectedHeader
impl PartialEq for ProtectedHeader
impl StructuralPartialEq for ProtectedHeader
Auto Trait Implementations§
impl Freeze for ProtectedHeader
impl RefUnwindSafe for ProtectedHeader
impl Send for ProtectedHeader
impl Sync for ProtectedHeader
impl Unpin for ProtectedHeader
impl UnsafeUnpin for ProtectedHeader
impl UnwindSafe for ProtectedHeader
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