SymmetricAlgorithm.GenerateKey Method ()
When overridden in a derived class, generates a random key (Key) to use for the algorithm.
Assembly: mscorlib (in mscorlib.dll)
In general, there is no reason to use this method, because CreateEncryptor() or CreateEncryptor(null, null) automatically generates both an initialization vector and a key. However, you may want to use the method to reuse a symmetric algorithm instance with a different key.
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0