Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall DATA_SALTIV(type, [salt], saltlen, [iv], ivlen)
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
(optional) A variable to be loaded with a salt value for key generation. (a)
A variable to be set to the length of the salt value for the specified encryption type. (n)
(optional) A variable to be loaded with an initialization vector (IV) for the specified encryption type. (a)
A variable to be set to the length of the initialization vector for the specified encryption type. (n)
DATA_SALTIV generates a random salt and/or an initialization vector for encrypting and decrypting data. You can then pass this information, along with the user password, as arguments to the DATA_ENCRYPT routine to maximize the effectiveness of the cipher you are using. Because neither the salt nor the initialization vector is considered to be sensitive information, you can write these values to a file and use them again to decrypt the data.
When you specify type and only saltlen and/or ivlen (i.e., not salt and/or iv), the appropriate length is returned but no salt or initialization vector value is generated.
When using the dbl8 compiler, you must .INCLUDE the file DBLDIR:datacrypt.def before using DATA_SALTIV.