TlsAead.decryptWithNonce

ubyte[] decryptWithNonce(const(ubyte)[] ciphertext, const(ubyte)[] aad, const(ubyte)[] explicitNonce)

Decrypts a TLS 1.2 record using an explicit nonce.

For TLS 1.2 GCM, the nonce is: implicit_iv (4 bytes) || explicit_nonce (8 bytes). The explicit nonce is sent with each record.

Parameters

ciphertextCiphertext + tag.
aadAdditional authenticated data.
explicitNonceThe 8-byte explicit nonce from the record.

Returns

Decrypted plaintext.

Throws

TlsException on decryption failure.