pub struct KeyPair { /* private fields */ }Expand description
An Ed25519 keypair for IDProva identity operations.
§Security: SR-1 (zeroize on drop)
The signing key bytes are zeroed from memory when this struct is dropped, preventing private key material from being retained in process memory.
Implementations§
Source§impl KeyPair
impl KeyPair
Sourcepub fn from_secret_bytes(bytes: &[u8; 32]) -> Self
pub fn from_secret_bytes(bytes: &[u8; 32]) -> Self
Create a keypair from existing secret key bytes (32 bytes).
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Get the verifying (public) key.
Sourcepub fn public_key_bytes(&self) -> [u8; 32]
pub fn public_key_bytes(&self) -> [u8; 32]
Get the public key bytes.
Sourcepub fn public_key_multibase(&self) -> String
pub fn public_key_multibase(&self) -> String
Get the public key as a multibase-encoded string (base58btc, prefix ‘z’).
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Get the public key as a serializable struct.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyPair
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnsafeUnpin for KeyPair
impl UnwindSafe for KeyPair
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