pub struct KeyMetadata { /* private fields */ }Expand description
Public, non-secret information about a registered key.
KeyMetadata is safe to log, send to monitors, and include in audit
records. It contains no information from which the key value could be
derived.
The length field reports the raw key length in bytes — the size of the
material that was registered with the vault before fragmentation. It is not
the size of the in-memory fragmented representation (which is larger and
implementation-defined).
Implementations§
Source§impl KeyMetadata
impl KeyMetadata
Sourcepub fn length(&self) -> usize
pub fn length(&self) -> usize
Raw key length, in bytes.
This is the length of the material that was originally registered, not the size of the in-memory fragmented representation.
Sourcepub fn algorithm(&self) -> Option<AlgorithmHint>
pub fn algorithm(&self) -> Option<AlgorithmHint>
Algorithm hint, if one was provided at registration.
Sourcepub fn registered_since_epoch(&self) -> Duration
pub fn registered_since_epoch(&self) -> Duration
Time of registration, expressed as a Duration since the Unix epoch.
Trait Implementations§
Source§impl Clone for KeyMetadata
impl Clone for KeyMetadata
Source§fn clone(&self) -> KeyMetadata
fn clone(&self) -> KeyMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KeyMetadata
impl RefUnwindSafe for KeyMetadata
impl Send for KeyMetadata
impl Sync for KeyMetadata
impl Unpin for KeyMetadata
impl UnsafeUnpin for KeyMetadata
impl UnwindSafe for KeyMetadata
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