Crypt Function (String, String) | |
Encrypt or decrypt a string.
Namespace:
XSharp.VO
Assembly:
XSharp.VO (in XSharp.VO.dll) Version: 2.21
Syntax FUNCTION Crypt(
cSource AS STRING,
cKey AS STRING
) AS STRING
public static string Crypt(
string cSource,
string cKey
)
Request Example
View SourceParameters
- cSource
- Type: String
The string that will be encrypted or decrypted. - cKey
- Type: String
The encryption/decryption key to be used.
Return Value
Type:
String
The encrypted/decrypted string.
Remarks
This function can be used to encrypt or decrypt any string. Note that the encryption key is very important for decrypting the string later on. Without the proper key (i.e., the same key used to encrypt the string), the data will be unusable.
Examples
This sample will encrypt a string and then decrypt the string:
1LOCAL a, b, c AS STRING
2LOCAL cKey as STRING
3a := "The quick brown fox jumps over the lazy dog."
4cKey := "CAT"
5b := Crypt(a, cKey)
6c := Crypt(b, cKey)
7? a
8? b
9? c
See Also