次の方法で共有


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
Public class Aes Represents the abstract base class from which all implementations of the Advanced Encryption Standard (AES) must inherit.
Public class AesManaged Provides a managed implementation of the Advanced Encryption Standard (AES) symmetric algorithm.
Public class AsymmetricAlgorithm Represents the abstract base class from which all implementations of asymmetric algorithms must inherit.
Public class AsymmetricKeyExchangeDeformatter Represents the base class from which all asymmetric key exchange deformatters derive.
Public class AsymmetricKeyExchangeFormatter Represents the base class from which all asymmetric key exchange formatters derive.
Public class AsymmetricSignatureDeformatter Represents the abstract base class from which all implementations of asymmetric signature deformatters derive.
Public class AsymmetricSignatureFormatter Represents the base class from which all implementations of asymmetric signature formatters derive.
Public class CryptographicException The exception that is thrown when an error occurs during a cryptographic operation.
Public class CryptographicUnexpectedOperationException The exception that is thrown when an unexpected operation occurs during a cryptographic operation.
Public class CryptoStream Defines a stream that links data streams to cryptographic transformations.
Public class CspKeyContainerInfo Provides additional information about a cryptographic key pair. This class cannot be inherited.
Public class CspParameters Contains parameters that are passed to the cryptographic service provider (CSP) that performs cryptographic computations. This class cannot be inherited.
Public class DeriveBytes Represents the abstract base class from which all classes that derive byte sequences of a specified length inherit.
Public class HashAlgorithm Represents the base class from which all implementations of cryptographic hash algorithms must derive.
Public class HMAC Represents the abstract class from which all implementations of Hash-based Message Authentication Code (HMAC) must derive.
Public class HMACSHA1 Computes a Hash-based Message Authentication Code (HMAC) using the SHA1 hash function.
Public class HMACSHA256 Computes a Hash-based Message Authentication Code (HMAC) using the SHA256 hash function.
Public class KeyedHashAlgorithm Represents the abstract class from which all implementations of keyed hash algorithms must derive.
Public class KeySizes Determines the set of valid key sizes for the symmetric cryptographic algorithms.
Public class MaskGenerationMethod Represents the abstract class from which all mask generator algorithms must derive.
Public class PKCS1MaskGenerationMethod Computes masks according to PKCS #1 for use by key exchange algorithms.
Public class ProtectedData Provides methods for encrypting and decrypting data. This class cannot be inherited.
Public class RandomNumberGenerator Represents the abstract class from which all implementations of cryptographic random number generators derive.
Public class Rfc2898DeriveBytes Implements password-based key derivation functionality, PBKDF2, by using a pseudo-random number generator based on HMACSHA1.
Public class RNGCryptoServiceProvider Implements a cryptographic Random Number Generator (RNG) using the implementation provided by the cryptographic service provider (CSP). This class cannot be inherited.
Public class RSA Represents the base class from which all implementations of the RSA algorithm inherit.
Public class 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.
Public class RSAOAEPKeyExchangeDeformatter Decrypts Optimal Asymmetric Encryption Padding (OAEP) key exchange data.
Public class RSAOAEPKeyExchangeFormatter Creates Optimal Asymmetric Encryption Padding (OAEP) key exchange data using RSA.
Public class RSAPKCS1KeyExchangeDeformatter Decrypts the PKCS #1 key exchange data.
Public class RSAPKCS1KeyExchangeFormatter Creates the PKCS#1 key exchange data using RSA.
Public class RSAPKCS1SignatureDeformatter Verifies an RSA PKCS #1 version 1.5 signature.
Public class RSAPKCS1SignatureFormatter Creates an RSA PKCS #1 version 1.5 signature.
Public class SHA1 Computes the SHA1 hash for the input data.
Public class SHA1Managed Computes the SHA1 hash for the input data using the managed library.
Public class SHA256 Computes the SHA256 hash for the input data.
Public class SHA256Managed Computes the SHA256 hash for the input data using the managed library.
Public class SymmetricAlgorithm Represents the abstract base class from which all implementations of symmetric algorithms must inherit.

Structures

  Structure Description
Public structure RSAParameters Represents the standard parameters for the RSA algorithm.

Interfaces

  Interface Description
Public interface ICryptoTransform Defines the basic operations of cryptographic transformations.
Public interface 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
Public enumeration CryptoStreamMode Specifies the mode of a cryptographic stream.
Public enumeration CspProviderFlags Specifies flags that modify the behavior of the cryptographic service providers (CSP).
Public enumeration KeyNumber Specifies whether to create an asymmetric signature key or an asymmetric exchange key.