crypto_box_seal

The crypto_box_seal() function encrypts a message m for a recipient whose public key is pkey. It puts the ciphertext whose length is crypto_box_SEALBYTES + m.length into c. The function creates a new key pair for each message, and attaches the public key to the ciphertext. The secret key is overwritten and is not accessible after this function returns.

  1. alias crypto_box_seal = deimos.sodium.crypto_box.crypto_box_seal
  2. bool crypto_box_seal(ubyte[] c, ubyte[] m, ubyte[crypto_box_PUBLICKEYBYTES] pkey)
    @nogc @trusted
    bool
    crypto_box_seal
    (
    scope ubyte[] c
    ,
    scope const ubyte[] m
    ,
    const ubyte[crypto_box_PUBLICKEYBYTES] pkey
    )

Meta