| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Decrypts an encrypted character string.
Sx_Decrypt( <cEncryptedString>, <cPassword> ) --> cString
The function returns the decrypted character string.
Function SX_Decrypt() decrypts a character string previously encrypted with function SX_Encrypt(). A successful decryption requires the same password <cPassword> as used for encrypting the unencrypted string.
| See also: | HB_Crypt(), HB_Decrypt(), SX_Encrypt() |
| Category: | Character functions , Conversion functions , Six driver |
| Source: | rdd\hbsix\sxcrypt.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example demonstrates encryption and decryption of a
// character string.
PROCEDURE Main
LOCAL cString := "xHarbour compiler"
LOCAL cPassWord := "AB0187"
LOCAL cCipher
? cCipher := SX_Encrypt( cString, cPassWord )
? cString := SX_Decrypt( cCipher, cPassWord )
RETURN
http://www.xHarbour.com