pub struct RootKey { /* private fields */ }Expand description
A root identity key.
This is the primary key that defines an agent’s identity. It should be stored securely and used sparingly.
§Security
- The inner
SigningKeyautomatically zeroizes secret key bytes on drop (via ed25519-dalek’szeroizefeature). - The
Debugimplementation only shows the DID (public info) to prevent accidental exposure of key material in logs.
Implementations§
Source§impl RootKey
impl RootKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<RootKey, Error>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<RootKey, Error>
Create from existing bytes.
§Security
The caller should zeroize the source bytes after this call if they are no longer needed.
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Get the public verifying key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RootKey
impl RefUnwindSafe for RootKey
impl Send for RootKey
impl Sync for RootKey
impl Unpin for RootKey
impl UnwindSafe for RootKey
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