<<

Contents

Search

>>

 

DECRYPT$

 

 

Function

 

 

Syntax:

DECRYPT$(<Algorithm>,<Key>,<Encoded Text>)

 

<Algorithm>

= <STRING-EXPRESSION>

<Key>

= <STRING-EXPRESSION>

<Encoded Text>

= <STRING-EXPRESSION>

 

 

Meaning:

DECRYPT$ returns the decoded text of <Encoded Text> by key <Key> and the algorithm <Algorithm>.

 

By defaultt, Java supports the following algorithms

Length of <Key> in Bytes

AES

16

Blowfish

Any length

DES

8

DESede

24

 

<Key> is used as argument for decoding the <Encoded Text>. The same key that was used with the encoding with  ENCRYPT$ must be specified here.

 

When encoded data from random files is read the variable EBUS_FILEMODE  must be set to 0. Otherwise the code can be destroyed.

 

Encoded data cannot be read from sequential files since the code may also contain the characters for linefeed and carriage return.

 

If encoded data is saved in Index Files, the data conversion for the respective Index File field must be disabled. (Function SET_FIELDMODE).

 

In the case of an error (invalid algorithm , invalid <Key> length) DECRYPT$ returns as value the empty string "" and ERRORTEXT$ contains the respective error report.

 

Parameter:

Algorithm

Encoding algorithm

Key

Key of encoding

Encoded Text

Text

 

Sample:

/* Decode VERSCHLUESSELT$ with DES algorithm and key "EBUSOFT"

H$ = DECRYPT$("DES", "EBUSOFT",VERSCHLUESSELT$)

 

See also:

ENCRYPT$

EBUS_FILEMODE

SET_FIELDMODE