xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

SX_Decrypt()

Decrypts an encrypted character string.

Syntax

Sx_Decrypt( <cEncryptedString>, <cPassword> ) --> cString

Arguments

<cEncryptedString>
This is a previously encrypted character string to decrypt.
<cPassword>
This is a character string holding the password used for encryption.

Return

The function returns the decrypted character string.

Description

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.

Info

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

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe