System.Security.Cryptography.SymmetricAlgorithm.GenerateIV Method

When overridden in a derived class, generates a random initialization vector (SymmetricAlgorithm.IV) to use for the algorithm.

Syntax

public abstract void GenerateIV ()

Remarks

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 SymmetricAlgorithm.GenerateIV method to reuse a symmetric algorithm instance with a different initialization vector.

Requirements

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