Crypto_Decrypt

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > Crypto >

Crypto_Decrypt

 

Description

 

Decrypts data with a designated algorithm.

 

Syntax

 

s = Crypto_Decrypt(sText, sPassword, nAlgorithm)

 

Returns

 

String.

The decrypted data.

 

Parameters

 

Name

Type

Optional

Meaning

sText

String

No

text to be decrypted

sPassword

String

No

password used for encrypting data.

nAlgorithm

Numeric

No

The cryptographic algorithm previously used to encrypt data.

It can be one of the following:

%Crypto_CALG_RC2

%Crypto_CALG_RC4

%Crypto_CALG_DES

 

Remarks

 

This functions is based on Microsoft's PROV_RSA_FULL Cryptographic Service Provider Type.

 

Restrictions

 

See also

 

Crypto_Encrypt

 

Examples

 

Dim sTxt As String

 

sTxt = Crypto_Encrypt("Hello world again!""The secret key"%Crypto_CALG_RC2)

MSGBOX 0, Crypto_Decrypt(sTxt, "The secret key"%Crypto_CALG_RC2

' results: Hello world again!