pub struct ProtectedHeader {
pub object_id: [u8; 32],
pub recipients: Vec<Stanza>,
pub encrypted_metadata: Vec<u8>,
pub signatures: Vec<SignatureStanza>,
pub extensions: Vec<Extension>,
}Fields§
§object_id: [u8; 32]§recipients: Vec<Stanza>§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.
extensions: Vec<Extension>Ignorable keys after 5, ascending. Empty encodes exactly as HIDE/0.1.
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§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 Forget for ProtectedHeader
impl Freeze for ProtectedHeader
impl Move 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