pub struct StaticSecret(/* private fields */);Expand description
A Ristretto255 Static Secret
Implementations§
Source§impl StaticSecret
impl StaticSecret
Sourcepub fn random_from_rng(csprng: &mut impl CryptoRng) -> Self
pub fn random_from_rng(csprng: &mut impl CryptoRng) -> Self
Generate a new StaticSecret with the supplied RNG.
Sourcepub fn diffie_hellman(&self, their_public: &PublicKey) -> SharedSecret
pub fn diffie_hellman(&self, their_public: &PublicKey) -> SharedSecret
Perform a Diffie-Hellman key agreement between self and their_public key to produce
a SharedSecret.
Trait Implementations§
Source§impl From<&StaticSecret> for PublicKey
impl From<&StaticSecret> for PublicKey
Source§fn from(value: &StaticSecret) -> Self
fn from(value: &StaticSecret) -> Self
Converts to this type from the input type.
Source§impl RandomSecretKey for StaticSecret
impl RandomSecretKey for StaticSecret
Source§fn random_secret_key(csprng: &mut impl CryptoRng) -> Self
fn random_secret_key(csprng: &mut impl CryptoRng) -> Self
Create a secret key from provided RNG.
Source§impl TakeTheHint<DalekRistretto255> for StaticSecret
impl TakeTheHint<DalekRistretto255> for StaticSecret
Auto Trait Implementations§
impl Freeze for StaticSecret
impl RefUnwindSafe for StaticSecret
impl Send for StaticSecret
impl Sync for StaticSecret
impl Unpin for StaticSecret
impl UnsafeUnpin for StaticSecret
impl UnwindSafe for StaticSecret
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