pub struct PreKey(/* private fields */);Expand description
Pre-key with key material for X3DH key agreement to be used until it’s lifetime has expired.
Implementations§
Source§impl PreKey
impl PreKey
pub fn new(prekey: PublicKey, lifetime: Lifetime) -> Self
pub fn key(&self) -> &PublicKey
pub fn as_bytes(&self) -> &[u8; 32]
pub fn to_bytes(self) -> [u8; 32]
pub fn sign( &self, secret_key: &SecretKey, rng: &Rng, ) -> Result<XSignature, XEdDSAError>
pub fn lifetime(&self) -> &Lifetime
pub fn verify_lifetime(&self) -> Result<(), LifetimeError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PreKey
impl<'de> Deserialize<'de> for PreKey
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 Copy for PreKey
impl Eq for PreKey
impl StructuralPartialEq for PreKey
Auto Trait Implementations§
impl Freeze for PreKey
impl RefUnwindSafe for PreKey
impl Send for PreKey
impl Sync for PreKey
impl Unpin for PreKey
impl UnwindSafe for PreKey
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