NativeDtlsEngine.encryptAlertRecord
private
ubyte[] encryptAlertRecord(DtlsPeerState state, TlsAead aead,
const(ubyte)[] alertPayload)Encrypt an alert record payload using the peer's write AEAD.
Uses the same encryption format as application data for the negotiated DTLS version (1.2 explicit nonce, 1.3 XOR nonce).
Parameters
state | The peer state (for epoch, sequence, version). |
aead | The write AEAD cipher. |
alertPayload | The 2-byte alert (level + description). |
Returns
Complete encrypted DTLS alert record.