private static ICryptoTransform CreateAEADEncryptor(CipherSuite cipherSuite, Record record,
byte[] key, byte[] fixedIV, byte[] recordIV,
UInt64 seqNum, out byte[] nonceExplicit)
{
// Construct the nonce for AEAD cipher
nonceExplicit = GenerateAEADNonceExplicit(recordIV, seqNum);
byte[] nonce = GenerateAEADNonce(fixedIV, nonceExplicit);
// Construct the additional bytes for AEAD cipher
byte[] additional = GetAdditionalBytes(seqNum, record.Type, record.Version, record.Fragment.Length);
return cipherSuite.BulkCipherAlgorithm.CreateEncryptor(key, nonce, additional);
}