AesCryptoServiceProvider.GenerateKey Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Generates a random key to use for the algorithm.

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public override void GenerateKey()

Exception Condition
CryptographicException

The key could not be generated.

.NET Framework
Available since 3.5
Return to top
Show: