Struct sphinx_packet::crypto::keys::PrivateKey
source · pub struct PrivateKey(_);Implementations§
source§impl PrivateKey
impl PrivateKey
sourcepub fn diffie_hellman(&self, remote_public_key: &PublicKey) -> SharedSecret
pub fn diffie_hellman(&self, remote_public_key: &PublicKey) -> SharedSecret
Perform a key exchange with another public key
pub fn new() -> Self
pub fn new_with_rng<R: RngCore + CryptoRng>(rng: &mut R) -> Self
pub fn to_bytes(&self) -> [u8; 32]
Trait Implementations§
source§impl Default for PrivateKey
impl Default for PrivateKey
source§impl<'a> From<&'a PrivateKey> for PublicKey
impl<'a> From<&'a PrivateKey> for PublicKey
source§fn from(private_key: &'a PrivateKey) -> PublicKey
fn from(private_key: &'a PrivateKey) -> PublicKey
Converts to this type from the input type.