pub struct SlotObjectPrefix {
pub format: FormatVersion,
pub key: KeyId,
pub kind: SlotKind,
}Expand description
The complete clear routing, without any device, claim number or part audience.
Fields§
§format: FormatVersionThe recorded format of this claim attempt.
key: KeyIdThe store key sealing the body.
kind: SlotKindKind and any key boxes.
Implementations§
Source§impl SlotObjectPrefix
impl SlotObjectPrefix
Sourcepub const MAX_LENGTH: usize
pub const MAX_LENGTH: usize
Longest prefix of any slot but an admission, including a circle key copy. An admission’s prefix is bounded only by its slot’s 4 MiB.
Sourcepub fn encode(&self) -> Result<Vec<u8>, Error>
pub fn encode(&self) -> Result<Vec<u8>, Error>
Encode the exact associated-data prefix, including any anonymous box.
Sourcepub fn copy_context(
format: FormatVersion,
key: KeyId,
place: BoxPlace,
routing: &KeyCopyPrefix,
) -> Result<Vec<u8>, Error>
pub fn copy_context( format: FormatVersion, key: KeyId, place: BoxPlace, routing: &KeyCopyPrefix, ) -> Result<Vec<u8>, Error>
Box context through the recipient’s sealing key, before generating its ephemeral key and ciphertext: the slot’s fixed fields, the box’s place and its routing. This context binds the slot path in crypto.
Sourcepub fn admission(bytes: &[u8]) -> Result<bool, Error>
pub fn admission(bytes: &[u8]) -> Result<bool, Error>
Whether the prefix bytes begins is an admission’s, whose length only
its whole bounded slot bounds. It reads the first four bytes.
Sourcepub fn length(bytes: &[u8]) -> Result<usize, Error>
pub fn length(bytes: &[u8]) -> Result<usize, Error>
Bound the clear prefix before reading its boxes. No length supplied by a peer can enlarge the fixed store/circle box sizes.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, Error>
pub fn decode(bytes: &[u8]) -> Result<Self, Error>
Decode exactly the prefix, without authenticating routing.
Trait Implementations§
Source§impl Clone for SlotObjectPrefix
impl Clone for SlotObjectPrefix
Source§fn clone(&self) -> SlotObjectPrefix
fn clone(&self) -> SlotObjectPrefix
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more