DATA_ENCRYPT

Encrypt plaintext data

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall DATA_ENCRYPT(type, password, source, [destination], [len], [salt, iv][, pad])

Arguments

type

One of the following encryption types: (n)

DC_3DES = Triple DES CBC three‑key mode

DC_AES128 = AES 128‑bit CBC mode

DC_AES192 = AES 192‑bit CBC mode

DC_AES256 = AES 256‑bit CBC mode

password

The password to be used on the source data buffer. (a)

source

The plain text data to be encrypted.

destination

(optional) A variable to be loaded with ciphertext data as a result of this operation.

len

(optional) A variable to be set to the length of the data written to destination. (n)

salt

(optional) A salt value for the encryption algorithm. (a)

iv

(optional) An initialization vector value for the encryption algorithm. (a)

pad

(optional) When set to 0, turns off PKCS padding. (See Data encryption for more information about padding.) (n)

Discussion

The DATA_ENCRYPT routine encrypts data passed in source and returns it in destination.

The following rules apply to len and destination:

If salt and iv are not specified, the values supplied to the encryption routine are nulls.

When using the dbl8 compiler, you must .INCLUDE the file DBLDIR:datacrypt.def before using DATA_ENCRYPT.

See also