hopr_crypto_types::seal

Function seal_data

Source
pub fn seal_data(data: &[u8], peer_id: PeerId) -> Result<Box<[u8]>>
Expand description

Performs randomized encryption of the given data, so that only the recipient with the given peer_id can decrypt it.