This function encrypts a string using the DES cryptographic algorithm.
Context
Windows client,
Windows server,
Adelia Web client,
Java client,
Java server,
Adelia Cloud client,
Event Adelia client.
Parameters
ALPHA(n) |
Key |
Encryption key. |
ALPHA(n) |
InputString |
String to be encrypted. |
ALPHA(n) |
OutputString |
String containing the input string's encrypted value. n >= ((InputStringValueLength - 1) DIV 8 + 1) * 16 ) InputStringValueLength is the length of the value of InputString, and DIV is the integer division operator. |
NUM_BIN_4 |
OutputStringLength |
Length of the output string definition: corresponds to the n in ALPHA(n) in the OutputString definition. |
NUM_BIN_4 |
ReturnCode |
Return code for the operation: 0 : Operation completed successfully. 1 : The key is not eight characters long. (obsolete) 2 : The length set in the output string definition is inadequate. |
Example
ALPHA(8) key
ALPHA(10) DecryptedPassword
ALPHA(32) EncryptedPassword
NUM_BIN_4 EncryptedLength
NUM_BIN_4 ReturnCode
Key = 'Abc123xZ'
DecryptedPassword = '1234567890'
EncryptedLength = 32
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxEncryptString' Key DecryptedPassword EncryptedPassword EncryptedLength ReturnCode
* The function returns the value '7B7A92E45BBD5130FCFBCF6D103B3431' in EncryptedPassword
List of the VaToolBx functions by topic