System.Security.Cryptography.RC2CryptoServiceProvider.GenerateKey C# (CSharp) Méthode

GenerateKey() public méthode

public GenerateKey ( ) : void
Résultat 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