Struct ssh_key::private::Ed25519Keypair
source · [−]pub struct Ed25519Keypair {
pub public: Ed25519PublicKey,
pub private: Ed25519PrivateKey,
}Expand description
Ed25519 private/public keypair.
Fields
public: Ed25519PublicKeyPublic key.
private: Ed25519PrivateKeyPrivate key.
Implementations
sourceimpl Ed25519Keypair
impl Ed25519Keypair
sourcepub fn random(rng: impl CryptoRng + RngCore) -> Self
This is supported on crate feature ed25519 only.
pub fn random(rng: impl CryptoRng + RngCore) -> Self
ed25519 only.Generate a random Ed25519 private keypair.
sourcepub fn from_seed(seed: &[u8; 32]) -> Self
This is supported on crate feature ed25519 only.
pub fn from_seed(seed: &[u8; 32]) -> Self
ed25519 only.Expand a keypair from a 32-byte seed value.
Trait Implementations
sourceimpl Clone for Ed25519Keypair
impl Clone for Ed25519Keypair
sourcefn clone(&self) -> Ed25519Keypair
fn clone(&self) -> Ed25519Keypair
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl ConstantTimeEq for Ed25519Keypair
This is supported on crate feature subtle only.
impl ConstantTimeEq for Ed25519Keypair
This is supported on crate feature
subtle only.sourceimpl Debug for Ed25519Keypair
impl Debug for Ed25519Keypair
sourceimpl From<&'_ Ed25519Keypair> for Ed25519PublicKey
impl From<&'_ Ed25519Keypair> for Ed25519PublicKey
sourcefn from(keypair: &Ed25519Keypair) -> Ed25519PublicKey
fn from(keypair: &Ed25519Keypair) -> Ed25519PublicKey
Converts to this type from the input type.
sourceimpl From<&'_ Keypair> for Ed25519Keypair
This is supported on crate feature ed25519 only.
impl From<&'_ Keypair> for Ed25519Keypair
This is supported on crate feature
ed25519 only.sourcefn from(key: &Keypair) -> Ed25519Keypair
fn from(key: &Keypair) -> Ed25519Keypair
Converts to this type from the input type.
sourceimpl From<Ed25519Keypair> for Ed25519PublicKey
impl From<Ed25519Keypair> for Ed25519PublicKey
sourcefn from(keypair: Ed25519Keypair) -> Ed25519PublicKey
fn from(keypair: Ed25519Keypair) -> Ed25519PublicKey
Converts to this type from the input type.
sourceimpl From<Ed25519Keypair> for KeypairData
impl From<Ed25519Keypair> for KeypairData
sourcefn from(keypair: Ed25519Keypair) -> KeypairData
fn from(keypair: Ed25519Keypair) -> KeypairData
Converts to this type from the input type.
sourceimpl From<Ed25519PrivateKey> for Ed25519Keypair
This is supported on crate feature ed25519 only.
impl From<Ed25519PrivateKey> for Ed25519Keypair
This is supported on crate feature
ed25519 only.sourcefn from(private: Ed25519PrivateKey) -> Ed25519Keypair
fn from(private: Ed25519PrivateKey) -> Ed25519Keypair
Converts to this type from the input type.
sourceimpl From<Keypair> for Ed25519Keypair
This is supported on crate feature ed25519 only.
impl From<Keypair> for Ed25519Keypair
This is supported on crate feature
ed25519 only.sourcefn from(key: Keypair) -> Ed25519Keypair
fn from(key: Keypair) -> Ed25519Keypair
Converts to this type from the input type.
sourceimpl PartialEq<Ed25519Keypair> for Ed25519Keypair
This is supported on crate feature subtle only.
impl PartialEq<Ed25519Keypair> for Ed25519Keypair
This is supported on crate feature
subtle only.sourceimpl Signer<Signature> for Ed25519Keypair
This is supported on crate feature ed25519 only.
impl Signer<Signature> for Ed25519Keypair
This is supported on crate feature
ed25519 only.sourceimpl TryFrom<&'_ Ed25519Keypair> for Keypair
This is supported on crate feature ed25519 only.
impl TryFrom<&'_ Ed25519Keypair> for Keypair
This is supported on crate feature
ed25519 only.sourceimpl TryFrom<Ed25519Keypair> for Keypair
This is supported on crate feature ed25519 only.
impl TryFrom<Ed25519Keypair> for Keypair
This is supported on crate feature
ed25519 only.impl Eq for Ed25519Keypair
This is supported on crate feature
subtle only.Auto Trait Implementations
impl RefUnwindSafe for Ed25519Keypair
impl Send for Ed25519Keypair
impl Sync for Ed25519Keypair
impl Unpin for Ed25519Keypair
impl UnwindSafe for Ed25519Keypair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, S> SignerMut<S> for T where
T: Signer<S>,
S: Signature,
impl<T, S> SignerMut<S> for T where
T: Signer<S>,
S: Signature,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more