System.Security.Cryptography.RC2CryptoServiceProvider.GenerateKey C# (CSharp) 메소드

GenerateKey() 공개 메소드

public GenerateKey ( ) : void
리턴 void
        public override void GenerateKey()
        {
            var key = new byte[KeySizeValue / 8];
            s_rng.GetBytes(key);
            KeyValue = key;
        }

Usage Example

 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);
         }
     }
 }
All Usage Examples Of System.Security.Cryptography.RC2CryptoServiceProvider::GenerateKey