System.Security.Cryptography Namespace
Microsoft Silverlight will reach end of support after October 2021. Learn more.
The System.Security.Cryptography namespace provides cryptographic services, including secure encoding and decoding of data, as well as many other operations, such as hashing, random number generation, and message authentication.
Classes
Class | Description | |
---|---|---|
Aes | Represents the abstract base class from which all implementations of the Advanced Encryption Standard (AES) must inherit. | |
AesManaged | Provides a managed implementation of the Advanced Encryption Standard (AES) symmetric algorithm. | |
AsymmetricAlgorithm | Represents the abstract base class from which all implementations of asymmetric algorithms must inherit. | |
AsymmetricKeyExchangeDeformatter | Represents the base class from which all asymmetric key exchange deformatters derive. | |
AsymmetricKeyExchangeFormatter | Represents the base class from which all asymmetric key exchange formatters derive. | |
AsymmetricSignatureDeformatter | Represents the abstract base class from which all implementations of asymmetric signature deformatters derive. | |
AsymmetricSignatureFormatter | Represents the base class from which all implementations of asymmetric signature formatters derive. | |
CryptographicException | The exception that is thrown when an error occurs during a cryptographic operation. | |
CryptographicUnexpectedOperationException | The exception that is thrown when an unexpected operation occurs during a cryptographic operation. | |
CryptoStream | Defines a stream that links data streams to cryptographic transformations. | |
CspKeyContainerInfo | Provides additional information about a cryptographic key pair. This class cannot be inherited. | |
CspParameters | Contains parameters that are passed to the cryptographic service provider (CSP) that performs cryptographic computations. This class cannot be inherited. | |
DeriveBytes | Represents the abstract base class from which all classes that derive byte sequences of a specified length inherit. | |
HashAlgorithm | Represents the base class from which all implementations of cryptographic hash algorithms must derive. | |
HMAC | Represents the abstract class from which all implementations of Hash-based Message Authentication Code (HMAC) must derive. | |
HMACSHA1 | Computes a Hash-based Message Authentication Code (HMAC) using the SHA1 hash function. | |
HMACSHA256 | Computes a Hash-based Message Authentication Code (HMAC) using the SHA256 hash function. | |
KeyedHashAlgorithm | Represents the abstract class from which all implementations of keyed hash algorithms must derive. | |
KeySizes | Determines the set of valid key sizes for the symmetric cryptographic algorithms. | |
MaskGenerationMethod | Represents the abstract class from which all mask generator algorithms must derive. | |
PKCS1MaskGenerationMethod | Computes masks according to PKCS #1 for use by key exchange algorithms. | |
ProtectedData | Provides methods for encrypting and decrypting data. This class cannot be inherited. | |
RandomNumberGenerator | Represents the abstract class from which all implementations of cryptographic random number generators derive. | |
Rfc2898DeriveBytes | Implements password-based key derivation functionality, PBKDF2, by using a pseudo-random number generator based on HMACSHA1. | |
RNGCryptoServiceProvider | Implements a cryptographic Random Number Generator (RNG) using the implementation provided by the cryptographic service provider (CSP). This class cannot be inherited. | |
RSA | Represents the base class from which all implementations of the RSA algorithm inherit. | |
RSACryptoServiceProvider | Performs asymmetric encryption and decryption using the implementation of the RSA algorithm provided by the cryptographic service provider (CSP). This class cannot be inherited. | |
RSAOAEPKeyExchangeDeformatter | Decrypts Optimal Asymmetric Encryption Padding (OAEP) key exchange data. | |
RSAOAEPKeyExchangeFormatter | Creates Optimal Asymmetric Encryption Padding (OAEP) key exchange data using RSA. | |
RSAPKCS1KeyExchangeDeformatter | Decrypts the PKCS #1 key exchange data. | |
RSAPKCS1KeyExchangeFormatter | Creates the PKCS#1 key exchange data using RSA. | |
RSAPKCS1SignatureDeformatter | Verifies an RSA PKCS #1 version 1.5 signature. | |
RSAPKCS1SignatureFormatter | Creates an RSA PKCS #1 version 1.5 signature. | |
SHA1 | Computes the SHA1 hash for the input data. | |
SHA1Managed | Computes the SHA1 hash for the input data using the managed library. | |
SHA256 | Computes the SHA256 hash for the input data. | |
SHA256Managed | Computes the SHA256 hash for the input data using the managed library. | |
SymmetricAlgorithm | Represents the abstract base class from which all implementations of symmetric algorithms must inherit. |
Structures
Structure | Description | |
---|---|---|
RSAParameters | Represents the standard parameters for the RSA algorithm. |
Interfaces
Interface | Description | |
---|---|---|
ICryptoTransform | Defines the basic operations of cryptographic transformations. | |
ICspAsymmetricAlgorithm | Defines methods that allow an AsymmetricAlgorithm class to enumerate key container information, and import and export Microsoft Cryptographic API (CAPI)–compatible key blobs. |
Enumerations
Enumeration | Description | |
---|---|---|
CryptoStreamMode | Specifies the mode of a cryptographic stream. | |
CspProviderFlags | Specifies flags that modify the behavior of the cryptographic service providers (CSP). | |
KeyNumber | Specifies whether to create an asymmetric signature key or an asymmetric exchange key. |