CryptA Function | |
Encrypt or decrypt a string, changing the contents of the original string as well as returning the encrypted string.
Namespace:
XSharp.VO
Assembly:
XSharp.VO (in XSharp.VO.dll) Version: 2.19
Syntax FUNCTION CryptA(
cSource AS STRING,
cKey AS STRING
) AS STRING
public static string CryptA(
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 is identical to Crypt() except that it also changes the original string cSource. 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 AS STRING
2LOCAL cKey as STRING
3a := "The quick brown fox jumps over the lazy dog."
4cKey := "CAT"
5? a
6
7? CryptA(a, cKey)
8
9? a
10
11CryptA(a, cKey)
12? a
13
See Also