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.

注意

有先進加密標準 (Advanced Encryption Standard,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 使用的 Unmanaged 資源,並且選擇性地釋放 Managed 資源。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 使用的 Unmanaged 資源,並且選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.

(繼承來源 SymmetricAlgorithm)

適用於

另請參閱