Function lair_keystore_api::internal::crypto_box::crypto_box_open [−][src]
pub async fn crypto_box_open(
recipient: X25519PrivKey,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairResult<Option<CryptoBoxData>>
Expand description
Wrapper around crypto_box_open from whatever lib we use.
Exact inverse of crypto_box_open
so nonce must be provided in CryptoBoxEncryptedData
.
The recipient’s private key encrypts from the sender’s pubkey.