[][src]Function sodalite::box_

pub fn box_(
    c: &mut [u8],
    m: &[u8],
    n: &BoxNonce,
    pk: &BoxPublicKey,
    sk: &BoxSecretKey
) -> Result<(), ()>

Public key authenticated encryption

Encrypt and authenticate a message m using the senders secret key sk, the recievers public key pk, and a nonce n. Ciphertext is stored in c.

Panics

  • If the first 32 bytes of m are not zero
  • XXX: size of c vs m?