CryptoSys PKI Pro Manual

Tdea.Encrypt(Byte[], Byte[], Mode, Byte[]) Method

Encrypt data in byte array.

Syntax

[C#]
public static byte[] Encrypt(
   byte[] input,
   byte[] key,
   Mode mode,
   byte[] iv 
)
[VB]
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 24 bytes (192 bits)
mode  Mode
Cipher Mode
iv  Byte
IV of exactly 8 bytes or null for ECB mode

Return Value

Byte
Ciphertext in byte array or empty array on error

Remarks

For ECB and CBC modes, input data length must be an exact multiple of the block length

See Also

VB6/C equivalent: TDEA_BytesMode

[Contents] [Index]

[PREV: Tdea.Decrypt(String, String, Mode, String, EncodingBase) Method...]   [Contents]   [Index]   
   [NEXT: Tdea.Encrypt(String, String, Mode, String) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.