Dtls12Client.decryptRecordPayload

const(ubyte)[] decryptRecordPayload(const(ubyte)[] payload, DtlsRecordHeader header)

Decrypts an encrypted DTLS 1.2 record payload using the read AEAD.

Payload format: explicit_nonce (8) | ciphertext | tag (16), with the epoch and sequence number taken from the record header.

Parameters

payloadThe encrypted record payload.
headerThe DTLS record header.

Returns

The decrypted plaintext, or null on failure.