Navigation:  Reference > Functions >

DECRYPTSTR()

Print this Topic Previous pageReturn to chapter overviewNext page

 

Decryptstr(1,2,3)

 

PURPOSE

 

This function will unencrypt a string.

 

PARTS

 

1. f/c/e Required: -  Encryption type seTwoFish  / seBlowFish / seDES /seRC2

 

2. f/c/e Required: - The string of characters to be decrypted

 

3. f/c/e Required: - The encryption phrase or "key"

 

 

RETURN TYPE - A

 

COMMENTS

 

If an invalid phrase is used when trying to decrypt, the string returned will be gibberish.   See ENCRYPTSTR() for further information.

 

With this function you can choose four deferent types of encryption types TwoFish BlowFish DES and RC2.

 

NOTE: If you are going to save this information into a  data field you need to make sure the fields size will large enough to store  the encrypted data.

 

EXAMPLE

 

Define string1,string2,string3 type a size 100

Define PassPhrase,filename type a size 80

define twofish,blowfish,des,rc2,md5,sha1 type l

 

ONStart:

String1 = 'Now is the time for all good men to come to the aid of there country'

PassPhrase = 'Computer Accounting Solutions'

Twofish = true

ret

 

(* -------------------------------------------------

  Events for: btndecode Object Type: TGlyphBtn

  ----------------------------------------------- *)

 btndecode.Click:

  if twofish

     string3 = Decryptstr(seTwofish,String2,passPhrase)

  else_if blowfish

     string3 = decryptstr(seBlowfish,String2,passPhrase)

  else_if des

     string3 = decryptstr(sedes,String2,passPhrase)

  else_if rc2

     string3 = decryptstr(serc2,String2,passPhrase)

  else

    msg 'Error encoding not set'

  endif

  Ret

 

See Also

ENCRYPTSTR()

 

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/decryptstr.htm