NativeDtlsEngine.encryptAppData12

private ubyte[] encryptAppData12(DtlsPeerState state, TlsAead aead, const(ubyte)[] plaintext)

Encrypt application data using DTLS 1.2 format (explicit nonce).

DTLS 1.2 AAD (13 bytes): seq_num (8) | type (1) | version (2) | length (2) Record payload: explicit_nonce (8) | ciphertext | tag (16)

Parameters

stateThe peer state.
aeadThe write AEAD cipher.
plaintextApplication data to encrypt.

Returns

Complete DTLS record.