pub struct EnvelopeCrypto { /* private fields */ }Implementations§
Source§impl EnvelopeCrypto
impl EnvelopeCrypto
pub fn new(pepper: [u8; 32]) -> Self
pub fn pepper_bytes(&self) -> [u8; 32]
pub fn decrypt_identity( &self, envelope: &IdentityEnvelope, key: &EnvelopeKey, handle: &UserId, now_ms: u64, ) -> RegistryResult<PublicIdentity>
pub fn encrypt_identity_for_peer( &self, key: &EnvelopeKey, handle: &UserId, identity: &PublicIdentity, peer_pubkey: [u8; 32], nonce: Option<[u8; 24]>, now_ms: u64, ) -> RegistryResult<IdentityEnvelope>
pub fn encrypt_with_sender( &self, kid: [u8; 8], sender_secret: [u8; 32], recipient_pubkey: [u8; 32], handle: &UserId, identity: &PublicIdentity, nonce: [u8; 24], ) -> RegistryResult<IdentityEnvelope>
Trait Implementations§
Source§impl Clone for EnvelopeCrypto
impl Clone for EnvelopeCrypto
Source§fn clone(&self) -> EnvelopeCrypto
fn clone(&self) -> EnvelopeCrypto
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EnvelopeCrypto
impl RefUnwindSafe for EnvelopeCrypto
impl Send for EnvelopeCrypto
impl Sync for EnvelopeCrypto
impl Unpin for EnvelopeCrypto
impl UnwindSafe for EnvelopeCrypto
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