DATA_SALTIV
Generate a salt and/or initialization vector
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)
Arguments
type
One of the following encryption types: (n)
DC_AES256 = AES 256-bit CBC mode
DC_AES192 = AES 192-bit CBC mode (deprecated)
DC_AES128 = AES 128-bit CBC mode (deprecated)
DC_3DES = Triple DES CBC three-key mode (deprecated)
salt
(optional) A variable to be loaded with a salt value for key generation. (a)
saltlen
A variable to be set to the length of the salt value for the specified encryption type. (n)
iv
(optional) A variable to be loaded with an initialization vector (IV) for the specified encryption type. (a)
ivlen
A variable to be set to the length of the initialization vector for the specified encryption type. (n)
Discussion
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.
All encryption types except DC_AES256 are deprecated and insecure according to industry security standards and therefore should not be used. |
When using the dbl8 compiler, you must .INCLUDE the file DBLDIR:datacrypt.def before using DATA_SALTIV.
See also
- Data encryption
- DATA_DECRYPT routine
- DATA_ENCRYPT routine