[][src]Function monocypher::key_exchange::shared

pub fn shared(
    secret_key: [u8; 32],
    their_public_key: [u8; 32]
) -> Result<[u8; 32], String>

Computes a shared key with your secret key and their public key.

Example

use monocypher::key_exchange::shared;

let pubkey = [1u8; 32];
shared([31u8; 32], pubkey);