Function hdk::x_salsa20_poly1305::x_salsa20_poly1305_decrypt
source · [−]pub fn x_salsa20_poly1305_decrypt(
key_ref: XSalsa20Poly1305KeyRef,
encrypted_data: XSalsa20Poly1305EncryptedData
) -> ExternResult<Option<XSalsa20Poly1305Data>>
Expand description
Libsodium secret-key authenticated encryption: secretbox_open
Opens encrypted data created by secretbox.
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 a holder of the shared key and has not been tampered with.
See aeads