public override void GenerateKey() { var key = new byte[KeySizeValue / 8]; s_rng.GetBytes(key); KeyValue = key; }
public byte[] GenerateKey() { while (true) { rc2.GenerateKey(); if (UTF8Encoding.UTF8.GetString(rc2.Key).IndexOf("'") == -1 && UTF8Encoding.UTF8.GetString(rc2.Key).IndexOf((char)34) == -1) { return(rc2.Key); } } }