DATA_ENCRYPT
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_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)
password
The password to be used on the source data buffer. (a)
source
The plaintext 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 (IV) 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 len is not specified, the destination specification must be the exact size of the encrypted ciphertext data.
- If len is specified, the size of destination must be equal to or greater than the size of the encrypted ciphertext data.
- If len is specified and destination is not, the exact size of the ciphertext data will be returned; no encryption is performed.
If salt and iv are not specified, the values supplied to the encryption routine are nulls.
All encryption types except DC_AES256 are considered 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_ENCRYPT.
See also
- Data encryption
- DATA_DECRYPT routine
- DATA_SALTIV routine