System.Security.Cryptography.DESCryptoServiceProvider.GenerateKey Method

Generates a random key (SymmetricAlgorithm.Key) to be used for the algorithm.

Syntax

public override void GenerateKey ()

Remarks

Use this method to generate a random key when none is specified. This method will never return a weak key (see DES.IsWeakKey(Byte[])) or a semi-weak key (see DES.IsSemiWeakKey(Byte[])).

This algorithm supports a key length of 64 bits.

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0