pub struct SecretKey(/* private fields */);Expand description
Secret Curve25519 key used for ECDH key agreement.
Implementations§
Source§impl SecretKey
impl SecretKey
pub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_rng(rng: &Rng) -> Result<Self, RngError>
pub fn public_key(&self) -> Result<PublicKey, X25519Error>
pub fn calculate_agreement( &self, their_public: &PublicKey, ) -> Result<[u8; 32], X25519Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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