xHarbour Reference Documentation > Function Reference |
Encrypts or decrypts a character string.
Crypt( <cString>, <cPassWord> ) --> cResult
The function encrypts a character string, and decrytps it using the same password. When a previously encrypted string is passed for <cString>, the return value is the original string.
See also: | CharXOR(), HB_Crypt() |
Category: | CT:String manipulation , Character functions |
Source: | ct\ctcrypt.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The examples shows encryption end decryption of a character string PROCEDURE Main LOCAL cString := "xHarbour compiler" LOCAL cPassWord:= "eeMCsq" LOCAL cCipher ? cCipher := Crypt( cString, cPassWord ) ? cCipher == cString // result: .F. cCipher := Crypt( cCipher, cPassWord ) ? cCipher == cString // result: .T. RETURN
http://www.xHarbour.com