DES 类

定义

表示数据加密标准 (DES) 算法的基类,所有 DES 实现都必须从此基类派生。Represents the base class for the Data Encryption Standard (DES) algorithm from which all DES implementations must derive.

public ref class DES abstract : System::Security::Cryptography::SymmetricAlgorithm
public abstract class DES : System.Security.Cryptography.SymmetricAlgorithm
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class DES : System.Security.Cryptography.SymmetricAlgorithm
type DES = class
    inherit SymmetricAlgorithm
Public MustInherit Class DES
Inherits SymmetricAlgorithm
继承
派生
属性

注解

此算法支持的密钥长度为64位。This algorithm supports a key length of 64 bits.

备注

提供了一种较新的对称加密算法高级加密标准(AES)。A newer symmetric encryption algorithm, Advanced Encryption Standard (AES), is available. 请考虑使用 Aes 类,而不是 DES 类。Consider using the Aes class instead of the DES class. 使用 DES 仅适用于与旧版应用程序和数据的兼容性。Use DES only for compatibility with legacy applications and data.

构造函数

DES()

初始化 DES 类的新实例。Initializes a new instance of the DES class.

字段

BlockSizeValue

表示加密操作的块大小(以位为单位)。Represents the block size, in bits, of the cryptographic operation.

(继承自 SymmetricAlgorithm)
FeedbackSizeValue

表示加密操作的反馈大小(以位为单位)。Represents the feedback size, in bits, of the cryptographic operation.

(继承自 SymmetricAlgorithm)
IVValue

表示对称算法的初始化向量 (IV)。Represents the initialization vector (IV) for the symmetric algorithm.

(继承自 SymmetricAlgorithm)
KeySizeValue

表示对称算法使用的密钥的大小(以位为单位)。Represents the size, in bits, of the secret key used by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
KeyValue

表示对称算法的密钥。Represents the secret key for the symmetric algorithm.

(继承自 SymmetricAlgorithm)
LegalBlockSizesValue

指定对称算法支持的块大小(以位为单位)。Specifies the block sizes, in bits, that are supported by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
LegalKeySizesValue

指定对称算法支持的密钥大小(以位为单位)。Specifies the key sizes, in bits, that are supported by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
ModeValue

表示对称算法中使用的密码模式。Represents the cipher mode used in the symmetric algorithm.

(继承自 SymmetricAlgorithm)
PaddingValue

表示对称算法中使用的填充模式。Represents the padding mode used in the symmetric algorithm.

(继承自 SymmetricAlgorithm)

属性

BlockSize

获取或设置加密操作的块大小(以位为单位)。Gets or sets the block size, in bits, of the cryptographic operation.

(继承自 SymmetricAlgorithm)
FeedbackSize

获取或设置针对密码反馈 (CFB) 和输出反馈 (OFB) 密码模式的加密操作的反馈大小(以位为单位)。Gets or sets the feedback size, in bits, of the cryptographic operation for the Cipher Feedback (CFB) and Output Feedback (OFB) cipher modes.

(继承自 SymmetricAlgorithm)
IV

获取或设置对称算法的初始化向量 (IV)。Gets or sets the initialization vector (IV) for the symmetric algorithm.

(继承自 SymmetricAlgorithm)
Key

获取或设置数据加密标准 (DES) 算法的密钥。Gets or sets the secret key for the Data Encryption Standard (DES) algorithm.

KeySize

获取或设置对称算法所用密钥的大小(以位为单位)。Gets or sets the size, in bits, of the secret key used by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
LegalBlockSizes

获取对称算法支持的块大小(以位为单位)。Gets the block sizes, in bits, that are supported by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
LegalKeySizes

获取对称算法支持的密钥大小(以位为单位)。Gets the key sizes, in bits, that are supported by the symmetric algorithm.

(继承自 SymmetricAlgorithm)
Mode

获取或设置对称算法的运算模式。Gets or sets the mode for operation of the symmetric algorithm.

(继承自 SymmetricAlgorithm)
Padding

获取或设置对称算法中使用的填充模式。Gets or sets the padding mode used in the symmetric algorithm.

(继承自 SymmetricAlgorithm)

方法

Clear()

释放 SymmetricAlgorithm 类使用的所有资源。Releases all resources used by the SymmetricAlgorithm class.

(继承自 SymmetricAlgorithm)
Create()

创建加密对象的实例以执行数据加密标准 (DES) 算法。Creates an instance of a cryptographic object to perform the Data Encryption Standard (DES) algorithm.

Create(String)

创建加密对象的实例以执行数据加密标准 (DES) 算法的指定实现。Creates an instance of a cryptographic object to perform the specified implementation of the Data Encryption Standard (DES) algorithm.

CreateDecryptor()

用当前的 Key 属性和初始化向量 (IV) 创建对称解密器对象。Creates a symmetric decryptor object with the current Key property and initialization vector (IV).

(继承自 SymmetricAlgorithm)
CreateDecryptor(Byte[], Byte[])

当在派生类中重写时,用指定的 Key 属性和初始化向量 (IV) 创建对称解密器对象。When overridden in a derived class, creates a symmetric decryptor object with the specified Key property and initialization vector (IV).

(继承自 SymmetricAlgorithm)
CreateEncryptor()

用当前的 Key 属性和初始化向量 (IV) 创建对称加密器对象。Creates a symmetric encryptor object with the current Key property and initialization vector (IV).

(继承自 SymmetricAlgorithm)
CreateEncryptor(Byte[], Byte[])

当在派生类中重写时,用指定的 Key 属性和初始化向量 (IV) 创建对称加密器对象。When overridden in a derived class, creates a symmetric encryptor object with the specified Key property and initialization vector (IV).

(继承自 SymmetricAlgorithm)
Dispose()

释放由 SymmetricAlgorithm 类的当前实例占用的所有资源。Releases all resources used by the current instance of the SymmetricAlgorithm class.

(继承自 SymmetricAlgorithm)
Dispose(Boolean)

释放 SymmetricAlgorithm 使用的非托管资源,并选择性地释放托管资源。Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.

(继承自 SymmetricAlgorithm)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GenerateIV()

当在派生类中重写时,生成用于该算法的随机初始化向量 (IV)。When overridden in a derived class, generates a random initialization vector (IV) to use for the algorithm.

(继承自 SymmetricAlgorithm)
GenerateKey()

当在派生类中重写时,生成用于该算法的随机密钥 (Key)。When overridden in a derived class, generates a random key (Key) to use for the algorithm.

(继承自 SymmetricAlgorithm)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IsSemiWeakKey(Byte[])

确定指定的密钥是否为半弱密钥。Determines whether the specified key is semi-weak.

IsWeakKey(Byte[])

确定指定的密钥是否为弱密钥。Determines whether the specified key is weak.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
ValidKeySize(Int32)

确定指定的密钥大小对当前算法是否有效。Determines whether the specified key size is valid for the current algorithm.

(继承自 SymmetricAlgorithm)

显式接口实现

IDisposable.Dispose()

释放 SymmetricAlgorithm 使用的非托管资源,并选择性地释放托管资源。Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.

(继承自 SymmetricAlgorithm)

适用于

另请参阅