SymmetricEncryptionAlgorithm.CreateEncryptor 方法

定义

重载

CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData)

Creates a ICryptoTransform implementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.

CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData, Provider provider)

Creates a ICryptoTransform implementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.

CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData)

Creates a ICryptoTransform implementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.

public abstract ICryptoTransform CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData)

参数

key
byte []

The key material to be used.

iv
byte []

The initialization vector to be used.

authenticationData
byte []

The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)

返回

abstract ICryptoTransform

A ICryptoTransform implementation

例外

InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException
InvalidAlgorithmParameterException

CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData, Provider provider)

Creates a ICryptoTransform implementation for encryption using the supplied initialization vector and the specific provider for the Java Security API.

public abstract ICryptoTransform CreateEncryptor(byte[] key, byte[] iv, byte[] authenticationData, Provider provider)

参数

key
byte []

The key material to be used.

iv
byte []

The initialization vector to be used.

authenticationData
byte []

The authentication data to be used with authenticating encryption algorithms (ignored for non-authenticating algorithms)

provider
Provider

The provider to use.

返回

abstract ICryptoTransform

A ICryptoTransform implementation

例外

InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException
InvalidAlgorithmParameterException

适用于