Struct SteVec
pub struct SteVec<const N: usize> { /* private fields */ }Expand description
Describes a SteVec, which is a vector of encrypted entries used to index JSON.
N is the length of the selector.
The envelope wire format: ONE KeyHeader carries the document data
key’s retrieval material (iv, tag, descriptor, keyset), and every entry
carries only its raw AEAD output — encrypted under that single key with a
nonce derived from the entry’s tokenized selector
(TokenizedSelector::aead_nonce). Nothing per-entry is self-decryptable
on its own: decryption reassembles header + entry c + selector nonce
(see KeyHeader::record_with_selector).
Implementations§
§impl<const N: usize> SteVec<N>
impl<const N: usize> SteVec<N>
pub fn entries(&self) -> &[EncryptedEntry<N>]
pub fn entries(&self) -> &[EncryptedEntry<N>]
The per-selector encrypted entries. entries()[0] is the root entry.
§impl SteVec<16>
impl SteVec<16>
pub fn into_root_record_with_nonce(
self,
) -> Result<RecordWithNonce, EncryptionError>
pub fn into_root_record_with_nonce( self, ) -> Result<RecordWithNonce, EncryptionError>
Consumes the SteVec and returns the root entry’s decryptable form: the key header’s record material + the root ciphertext + the root selector (source of both the nonce and the AAD binding). The root entry is always first.
pub fn root_nonce(&self) -> Result<[u8; 12], EncryptionError>
pub fn root_nonce(&self) -> Result<[u8; 12], EncryptionError>
The root entry’s selector-derived AEAD nonce. If the SteVec is empty, an error is returned.
pub fn root_selector(&self) -> Result<[u8; 16], EncryptionError>
pub fn root_selector(&self) -> Result<[u8; 16], EncryptionError>
The root entry’s full 16-byte tokenized selector, bound into the AAD of the root ciphertext. If the SteVec is empty, an error is returned.
Trait Implementations§
§impl<'de, const N: usize> Deserialize<'de> for SteVec<N>
impl<'de, const N: usize> Deserialize<'de> for SteVec<N>
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
§impl IntoIterator for SteVec<16>
impl IntoIterator for SteVec<16>
Auto Trait Implementations§
impl<const N: usize> Freeze for SteVec<N>
impl<const N: usize> RefUnwindSafe for SteVec<N>
impl<const N: usize> Send for SteVec<N>
impl<const N: usize> Sync for SteVec<N>
impl<const N: usize> Unpin for SteVec<N>
impl<const N: usize> UnsafeUnpin for SteVec<N>
impl<const N: usize> UnwindSafe for SteVec<N>
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more