[][src]Function dup_crypto::private_message::decrypt_private_message

pub fn decrypt_private_message<'m, A: AsRef<[u8]>>(
    additionally_authenticated_data: Aad<A>,
    algorithm: Algorithm,
    encrypted_message: &'m mut [u8],
    receiver_key_pair: &Ed25519KeyPair
) -> Result<(&'m [u8], Option<Signature>), PrivateMessageError>

Decrypt private message. Return a reference to decrypted bytes and an optional signature. If the authentication method chosen by the sender is Signature, then the signature is necessarily returned. The signature is returned to allow subsequent publication of proof that this particular message was sent by the sender.