Struct tink_core::primitiveset::PrimitiveSet [−][src]
Expand description
PrimitiveSet
is used for supporting key rotation: primitives in a set
correspond to keys in a keyset. Users will usually work with primitive
instances, which essentially wrap primitive sets. For example an instance of
an AEAD-primitive for a given keyset holds a set of AEAD-primitives
corresponding to the keys in the keyset, and uses the set members to do the
actual crypto operations: to encrypt data the primary AEAD-primitive from
the set is used, and upon decryption the ciphertext’s prefix determines the
id of the primitive from the set.
PrimitiveSet
is public to allow its use in implementations of custom
primitives.
Fields
primary: Option<Entry>
entries: HashMap<Vec<u8>, Vec<Entry>>
Implementations
Return an empty instance of PrimitiveSet
.
Return all primitives in the set that have RAW prefix.
Return all primitives in the set that have the given prefix.
Trait Implementations
Returns the “default value” for a type. Read more
Convert an untyped PrimitiveSet
into a TypedPrimitiveSet
. This will
panic if any of the primitives are not of the correct type.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for PrimitiveSet
impl !Send for PrimitiveSet
impl !Sync for PrimitiveSet
impl Unpin for PrimitiveSet
impl !UnwindSafe for PrimitiveSet
Blanket Implementations
Mutably borrows from an owned value. Read more