private void InitEncryptionAlgorithm() { if(EncryptionIV == null || EncryptionIV.Length == 0) { // create the IV EncryptionIV = new byte[16]; // 128 bytes Random rand = new Random(31); rand.NextBytes(EncryptionIV); } }