pub struct AsymmetricKey<P, S> {
pub public_key: P,
pub secret_key: Option<S>,
}Expand description
Fields§
§public_key: P§secret_key: Option<S>Implementations§
Source§impl AsymmetricKey<VerifyingKey, SigningKey>
impl AsymmetricKey<VerifyingKey, SigningKey>
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 TryFrom<AsymmetricKey<PublicKey, StaticSecret>> for Jwk
Converts an X25519KeyPair to a Jwk.
impl TryFrom<AsymmetricKey<PublicKey, StaticSecret>> for Jwk
Converts an X25519KeyPair to a Jwk.
Source§impl TryFrom<AsymmetricKey<VerifyingKey, SigningKey>> for Jwk
Converts an Ed25519KeyPair to a Jwk.
impl TryFrom<AsymmetricKey<VerifyingKey, SigningKey>> for Jwk
Converts an Ed25519KeyPair to a Jwk.
Auto Trait Implementations§
impl<P, S> Freeze for AsymmetricKey<P, S>
impl<P, S> RefUnwindSafe for AsymmetricKey<P, S>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for AsymmetricKey<P, S>
impl<P, S> Sync for AsymmetricKey<P, S>
impl<P, S> Unpin for AsymmetricKey<P, S>
impl<P, S> UnwindSafe for AsymmetricKey<P, S>where
P: UnwindSafe,
S: UnwindSafe,
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