#[repr(i32)]pub enum KeyForm {
KEY_FORM_UNSPECIFIED = 0,
KEY_FORM_RAW_BYTES = 1,
KEY_FORM_PKCS8_DER = 2,
KEY_FORM_OPAQUE_HANDLE = 3,
}Expand description
How the secret is presented to the signer. Some signers operate on raw bytes; others on opaque handles to keys held inside hardware.
Variants§
KEY_FORM_UNSPECIFIED = 0
KEY_FORM_RAW_BYTES = 1
32 raw private-key bytes (Ed25519 / k256 / p256 seed or scalar). Only used by the file signer; rejected by hardware signers.
KEY_FORM_PKCS8_DER = 2
PKCS#8 v1 DER (RFC 5958). Accepted by the file signer.
KEY_FORM_OPAQUE_HANDLE = 3
Opaque handle (TPM persistent handle, CTAP credentialId, SE label). The signer interprets the bytes; mkit treats them as opaque.
Implementations§
Source§impl KeyForm
impl KeyForm
Sourcepub const Unspecified: Self = Self::KEY_FORM_UNSPECIFIED
pub const Unspecified: Self = Self::KEY_FORM_UNSPECIFIED
Idiomatic alias for Self::KEY_FORM_UNSPECIFIED; Debug prints the variant name.
Sourcepub const RawBytes: Self = Self::KEY_FORM_RAW_BYTES
pub const RawBytes: Self = Self::KEY_FORM_RAW_BYTES
Idiomatic alias for Self::KEY_FORM_RAW_BYTES; Debug prints the variant name.
Sourcepub const Pkcs8Der: Self = Self::KEY_FORM_PKCS8_DER
pub const Pkcs8Der: Self = Self::KEY_FORM_PKCS8_DER
Idiomatic alias for Self::KEY_FORM_PKCS8_DER; Debug prints the variant name.
Sourcepub const OpaqueHandle: Self = Self::KEY_FORM_OPAQUE_HANDLE
pub const OpaqueHandle: Self = Self::KEY_FORM_OPAQUE_HANDLE
Idiomatic alias for Self::KEY_FORM_OPAQUE_HANDLE; Debug prints the variant name.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for KeyForm
Available on crate feature arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for KeyForm
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreimpl Copy for KeyForm
Source§impl Enumeration for KeyForm
impl Enumeration for KeyForm
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.impl Eq for KeyForm
impl StructuralPartialEq for KeyForm
Auto Trait Implementations§
impl Freeze for KeyForm
impl RefUnwindSafe for KeyForm
impl Send for KeyForm
impl Sync for KeyForm
impl Unpin for KeyForm
impl UnsafeUnpin for KeyForm
impl UnwindSafe for KeyForm
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