MACTripleDES 构造函数

定义

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

重载

MACTripleDES()

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

MACTripleDES(Byte[])

使用指定的密钥数据初始化 MACTripleDES 类的新实例。Initializes a new instance of the MACTripleDES class with the specified key data.

MACTripleDES(String, Byte[])

使用 MACTripleDES 的指定实现,用指定的密钥数据初始化 TripleDES 类的新实例。Initializes a new instance of the MACTripleDES class with the specified key data and using the specified implementation of TripleDES.

MACTripleDES()

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

public:
 MACTripleDES();
public MACTripleDES ();
Public Sub New ()

注解

此构造函数使用的默认实现 TripleDESThis constructor uses the default implementation of TripleDES.

适用于

MACTripleDES(Byte[])

使用指定的密钥数据初始化 MACTripleDES 类的新实例。Initializes a new instance of the MACTripleDES class with the specified key data.

public:
 MACTripleDES(cli::array <System::Byte> ^ rgbKey);
public MACTripleDES (byte[] rgbKey);
new System.Security.Cryptography.MACTripleDES : byte[] -> System.Security.Cryptography.MACTripleDES
Public Sub New (rgbKey As Byte())

参数

rgbKey
Byte[]

MACTripleDES 加密的机密密钥。The secret key for MACTripleDES encryption.

例外

rgbKey 参数为 nullThe rgbKey parameter is null.

示例

有关如何使用此构造函数的示例,请参阅 MACTripleDES 类。For an example of how to use this constructor, see the MACTripleDES class.

注解

此构造函数使用的默认实现 TripleDESThis constructor uses the default implementation of TripleDES. rgbKey参数的长度必须为16或24个字节。The rgbKey parameter must be 16 or 24 bytes in length.

适用于

MACTripleDES(String, Byte[])

使用 MACTripleDES 的指定实现,用指定的密钥数据初始化 TripleDES 类的新实例。Initializes a new instance of the MACTripleDES class with the specified key data and using the specified implementation of TripleDES.

public:
 MACTripleDES(System::String ^ strTripleDES, cli::array <System::Byte> ^ rgbKey);
public MACTripleDES (string strTripleDES, byte[] rgbKey);
new System.Security.Cryptography.MACTripleDES : string * byte[] -> System.Security.Cryptography.MACTripleDES
Public Sub New (strTripleDES As String, rgbKey As Byte())

参数

strTripleDES
String

要使用的 TripleDES 实现的名称。The name of the TripleDES implementation to use.

rgbKey
Byte[]

MACTripleDES 加密的机密密钥。The secret key for MACTripleDES encryption.

例外

rgbKey 参数为 nullThe rgbKey parameter is null.

strTripleDES 参数不是 TripleDES 实现的有效名称。The strTripleDES parameter is not a valid name of a TripleDES implementation.

注解

strTripleDES参数是实现类型的友好名称 TripleDESThe strTripleDES parameter is the friendly name of the TripleDES implementation type. 默认实现为 "TripleDES"。The default implementation is System.Security.Cryptography.TripleDES.

rgbKey参数的长度必须为16或24个字节。The rgbKey parameter must be 16 or 24 bytes in length.

适用于