pub struct IdentityKeypair { /* private fields */ }Expand description
Ed25519 signing keypair. Private key is zeroed on drop.
Implementations§
Source§impl IdentityKeypair
impl IdentityKeypair
Sourcepub fn from_derived_key(key: &DerivedKey) -> Self
pub fn from_derived_key(key: &DerivedKey) -> Self
Create a keypair from derived key material (32-byte Ed25519 seed).
Sourcepub fn from_signing_key(key: SigningKey) -> Self
pub fn from_signing_key(key: SigningKey) -> Self
Create a keypair from a raw Ed25519 signing key.
Sourcepub fn from_seed(seed: &[u8; 32]) -> Self
pub fn from_seed(seed: &[u8; 32]) -> Self
Create a keypair from a 32-byte seed (e.g. for token-derived sessions).
Sourcepub fn from_random() -> Self
pub fn from_random() -> Self
Generate a random keypair (for one-time token keys).
Sourcepub fn from_token_seed(token: &str, project_id: &str) -> Self
pub fn from_token_seed(token: &str, project_id: &str) -> Self
Derive a deterministic keypair from arbitrary data (e.g. token + project ID). Uses SHA-256 to produce a 32-byte seed.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Get the public key for this keypair.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdentityKeypair
impl RefUnwindSafe for IdentityKeypair
impl Send for IdentityKeypair
impl Sync for IdentityKeypair
impl Unpin for IdentityKeypair
impl UnsafeUnpin for IdentityKeypair
impl UnwindSafe for IdentityKeypair
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