fn ec_diffie_hellman(
        &mut self,
        context: &Box<dyn Secret>,
        peer_public_key: &[u8],
    ) -> OckamResult<Box<dyn Secret>> {
        let context = Self::get_entry_map(&self.map, context)?;
        let ecdh = self.v.ec_diffie_hellman(context, peer_public_key)?;
        let id = self.add_secret(ecdh);
        // TODO: What if ecdh result is persistent?

        Ok(Box::new(FilesystemVaultSecret(id)))
    }
/// Compute Elliptic-Curve Diffie-Hellman using this secret key
///
/// and the specified uncompressed public key
Compute Elliptic-Curve Diffie-Hellman using this secret key
and the specified uncompressed public key
Compute Elliptic - Curve Diffie - Hellman using this secret key and the specified uncompressed public key
fn ec_diffie_hellman(
        &mut self,
        context: &Box<dyn Secret>,
        peer_public_key: &[u8],
    ) -> OckamResult<Box<dyn Secret>> {
        let context = Self::get_entry_map(&self.map, context)?;
        let ecdh = self.v.ec_diffie_hellman(context, peer_public_key)?;
        let id = self.add_secret(ecdh);
        // TODO: What if ecdh result is persistent?
        Ok(Box::new(FilesystemVaultSecret(id)))
    }
fn ec_diffie_hellman ( & mut self , context : & Box < dyn Secret > , peer_public_key : & [ u8 ] , ) -> OckamResult < Box < dyn Secret > > { let context = Self :: get_entry_map ( & self . map , context ) ? ; let ecdh = self . v . ec_diffie_hellman ( context , peer_public_key ) ? ; let id = self . add_secret ( ecdh ) ; // TODO: What if ecdh result is persistent? Ok ( Box :: new ( FilesystemVaultSecret ( id ) ) ) }
Compute Elliptic-Curve Diffie-Hellman using this secret key
and the specified uncompressed public key
Compute Elliptic - Curve Diffie - Hellman using this secret key and the specified uncompressed public key
&mut self
context
&Box<dyn Secret>
peer_public_key
&[u8]
&mut self
context
&Box<dyn Secret>
peer_public_key
&[u8]