Enum tink_proto::OutputPrefixType [−][src]
#[repr(i32)]
pub enum OutputPrefixType {
UnknownPrefix,
Tink,
Legacy,
Raw,
Crunchy,
}
Expand description
Tink produces and accepts ciphertexts or signatures that consist of a prefix and a payload. The payload and its format is determined entirely by the primitive, but the prefix has to be one of the following 4 types:
- Legacy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte key id that is computed from the key material. In addition to that, signature schemes and MACs will add a \x00 byte to the end of the data being signed / MACed when operating on keys with this OutputPrefixType.
- Crunchy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte key id that is generated randomly.
- Tink : prefix is 5 bytes, starts with \x01 and followed by 4-byte key id that is generated randomly.
- Raw : prefix is 0 byte, i.e., empty.
Variants
UnknownPrefix
Tink
Legacy
Raw
Crunchy
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for OutputPrefixType
impl Send for OutputPrefixType
impl Sync for OutputPrefixType
impl Unpin for OutputPrefixType
impl UnwindSafe for OutputPrefixType
Blanket Implementations
Mutably borrows from an owned value. Read more