pub type Ed25519KeyPair = AsymmetricKey<VerifyingKey, SigningKey>;Aliased Type§
pub struct Ed25519KeyPair {
pub public_key: VerifyingKey,
pub secret_key: Option<SigningKey>,
}Fields§
§public_key: VerifyingKey§secret_key: Option<SigningKey>Implementations§
Source§impl Ed25519KeyPair
impl Ed25519KeyPair
Sourcepub fn get_x25519(&self) -> Result<X25519KeyPair, Error>
pub fn get_x25519(&self) -> Result<X25519KeyPair, Error>
Returns the X25519 key pair corresponding to the Ed25519 key pair.
§Returns
A Result containing the X25519 key pair as X25519KeyPair or an Error.
Trait Implementations§
Source§impl CoreSign for Ed25519KeyPair
impl CoreSign for Ed25519KeyPair
Source§impl Debug for Ed25519KeyPair
impl Debug for Ed25519KeyPair
Source§impl Generate for Ed25519KeyPair
impl Generate for Ed25519KeyPair
Source§fn new() -> Result<Ed25519KeyPair, Error>
fn new() -> Result<Ed25519KeyPair, Error>
Generates a new Ed25519 key pair.
If the initial seed is empty or invalid, a random seed will be generated.
§Returns
A new Ed25519KeyPair instance or an Error.
Source§fn new_with_seed(seed: &[u8]) -> Result<Ed25519KeyPair, Error>
fn new_with_seed(seed: &[u8]) -> Result<Ed25519KeyPair, Error>
Source§fn from_public_key(public_key: &[u8; 32]) -> Result<Ed25519KeyPair, Error>
fn from_public_key(public_key: &[u8; 32]) -> Result<Ed25519KeyPair, Error>
Source§fn from_secret_key(secret_key: &[u8; 32]) -> Result<Ed25519KeyPair, Error>
fn from_secret_key(secret_key: &[u8; 32]) -> Result<Ed25519KeyPair, Error>
Source§impl KeyMaterial for Ed25519KeyPair
impl KeyMaterial for Ed25519KeyPair
Source§impl ToMultikey for Ed25519KeyPair
impl ToMultikey for Ed25519KeyPair
Source§fn to_multikey(&self) -> String
fn to_multikey(&self) -> String
Converts keypair into its multikey string
Source§impl TryFrom<Jwk> for Ed25519KeyPair
Converts a Jwk to an Ed25519KeyPair.
impl TryFrom<Jwk> for Ed25519KeyPair
Converts a Jwk to an Ed25519KeyPair.