pub struct RemoteIdentity { /* private fields */ }Expand description
The encrypting side of RNS 1.4.2 Identity.encrypt. No private material.
Implementations§
Source§impl RemoteIdentity
impl RemoteIdentity
pub fn from_public_keys( encryption_public: IdentityEncryptionPublicKey, signing_public: IdentitySigningPublicKey, ) -> RemoteIdentity
pub const fn encryption_public_key(&self) -> IdentityEncryptionPublicKey
pub const fn identity_hash(&self) -> IdentityHash
pub fn encrypt( &self, ephemeral_secret: &X25519SecretKey, iv: &[u8; 16], plaintext: &[u8], out: &mut [u8], ) -> Result<usize, EncryptError>
Sourcepub fn encrypt_to_ratchet(
&self,
ratchet_public: &X25519PublicKey,
ephemeral_secret: &X25519SecretKey,
iv: &[u8; 16],
plaintext: &[u8],
out: &mut [u8],
) -> Result<usize, EncryptError>
pub fn encrypt_to_ratchet( &self, ratchet_public: &X25519PublicKey, ephemeral_secret: &X25519SecretKey, iv: &[u8; 16], plaintext: &[u8], out: &mut [u8], ) -> Result<usize, EncryptError>
RNS 1.4.2 Identity.encrypt(ratchet=…). Only the Diffie-Hellman target changes; the HKDF salt stays the identity hash.
Trait Implementations§
Source§impl Clone for RemoteIdentity
impl Clone for RemoteIdentity
Source§fn clone(&self) -> RemoteIdentity
fn clone(&self) -> RemoteIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RemoteIdentity
Source§impl Debug for RemoteIdentity
impl Debug for RemoteIdentity
impl Eq for RemoteIdentity
Source§impl PartialEq for RemoteIdentity
impl PartialEq for RemoteIdentity
impl StructuralPartialEq for RemoteIdentity
Auto Trait Implementations§
impl Freeze for RemoteIdentity
impl RefUnwindSafe for RemoteIdentity
impl Send for RemoteIdentity
impl Sync for RemoteIdentity
impl Unpin for RemoteIdentity
impl UnsafeUnpin for RemoteIdentity
impl UnwindSafe for RemoteIdentity
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