Xbasic
ENCRYPT_STRING Function
Syntax
Encrypted_String as C = ENCRYPT_STRING(C String[,C Key])
Arguments
- String
A character string.
- Key
An encryption key. Character
Description
Encrypt a string given Plaintext.
Discussion
ENCRYPT_STRING() returns an encrypted version of a character string of arbitrary length. This function is useful when encrypting individual fields in a record. Note: Consider using the more secure A5_Encrypt_String Function.
Example
? encrypt_string("Alpha Software")
= "$Z)kd*ky+B#1@"
? encrypt_string("Alpha Software", "password")
= ">jYM?_Po?w'js5"
? decrypt_string("$Z)kd*ky+B#1@")
= "Alpha Software"
? decrypt_string(">jYM?_Po?w'js5", "password")
= "Alpha Software"See Also