pub struct KeyId(/* private fields */);Expand description
A unique identifier for a cryptographic key.
Implementations§
Source§impl KeyId
impl KeyId
Sourcepub const fn from_bytes(bytes: [u8; 16]) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Self
Create a KeyId from raw bytes.
Sourcepub fn generate_versioned(base_id: &KeyId, version: u32) -> Result<Self>
pub fn generate_versioned(base_id: &KeyId, version: u32) -> Result<Self>
Generate a versioned KeyId based on a base ID and version
Sourcepub fn same_base_id(_id1: &KeyId, _id2: &KeyId) -> bool
pub fn same_base_id(_id1: &KeyId, _id2: &KeyId) -> bool
Check for same base id for any two keys
Sourcepub fn generate_base() -> Result<Self>
pub fn generate_base() -> Result<Self>
Generate a new random base KeyId for a key family
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyId
impl<'de> Deserialize<'de> for KeyId
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyId
impl StructuralPartialEq for KeyId
Auto Trait Implementations§
impl Freeze for KeyId
impl RefUnwindSafe for KeyId
impl Send for KeyId
impl Sync for KeyId
impl Unpin for KeyId
impl UnwindSafe for KeyId
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