Aes256Encrypt(Byte, Byte, Mode, Byte) Method |
Encrypt data in byte array
Namespace: CryptoSysAPIAssembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntaxpublic static byte[] Encrypt(
byte[] input,
byte[] key,
Mode mode,
byte[] iv
)
Public Shared Function Encrypt (
input As Byte(),
key As Byte(),
mode As Mode,
iv As Byte()
) As Byte()
Parameters
- input Byte
- Input data
- key Byte
- Key of exactly 32 bytes (256 bits)
- mode Mode
- Cipher Mode
- iv Byte
- IV of exactly 16 bytes or null/Nothing for ECB mode
Return Value
ByteCiphertext in byte array or empty array on error
RemarksFor ECB and CBC modes, input data length must
be an exact multiple of the block length (16 bytes)
See Also