RC2 类

定义

表示 RC2 算法的所有实现均必须从中派生的基类。Represents the base class from which all implementations of the RC2 algorithm must derive.

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

注解

备注

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

构造函数

RC2()

初始化 RC2 的新实例。Initializes a new instance of RC2.

字段

BlockSizeValue

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

(继承自 SymmetricAlgorithm)
EffectiveKeySizeValue

表示 RC2 算法使用的机密密钥的有效大小(以位为单位)。Represents the effective size of the secret key used by the RC2 algorithm in bits.

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)
EffectiveKeySize

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

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

获取或设置对称算法的密钥。Gets or sets the secret key for the symmetric algorithm.

(继承自 SymmetricAlgorithm)
KeySize

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

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()

创建加密对象的实例以执行 RC2 算法。Creates an instance of a cryptographic object to perform the RC2 algorithm.

Create(String)

创建加密对象的实例以执行 RC2 算法的指定实现。Creates an instance of a cryptographic object to perform the specified implementation of the RC2 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)
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)

适用于

另请参阅