DESCryptoServiceProvider Constructor ()

 
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.

Initializes a new instance of the DESCryptoServiceProvider class.

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

new : unit -> DESCryptoServiceProvider

Exception Condition
CryptographicException

The Data Encryption Standard (DES) cryptographic service provider is not available.

The following code example uses DESCryptoServiceProvider (an implementation of DES) with the specified key (Key) and initialization vector (IV) to encrypt a file specified by inName. It then outputs the encrypted result to the file specified by outName.

No code example is currently available or this language may not be supported.

Decryption can be handled in the same way; use CreateDecryptor instead of CreateEncryptor. The same key (Key) and initialization vector (IV) used to encrypt the file must be used to decrypt it.

.NET Framework
Available since 1.1
Return to top
Show: