Function hdk::x_salsa20_poly1305::x_25519_x_salsa20_poly1305_decrypt[][src]

pub fn x_25519_x_salsa20_poly1305_decrypt(
    recipient: X25519PubKey,
    sender: X25519PubKey,
    encrypted_data: XSalsa20Poly1305EncryptedData
) -> ExternResult<Option<XSalsa20Poly1305Data>>

Libsodium keypair based authenticated encryption: box_open

Opens encrypted data created by box.

If the encrypted data fails authentication and cannot be decrypted this function returns None .

This means that if any decrypted data is returned by this function it was created by either keypair and has not been tampered with.

See https://www.imperialviolet.org/2015/05/16/aeads.html