Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_encodest( <cstring> | @<cmemvar> [, <nlength> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_ENCODEST( <cString> | @<cMemvar> [, <nLength> ] )


Parameters

<cString>
Character string to encrypt.

<cMemvar>
Alternative to <cString>. Memory variable containing a string to encrypt.

<nLength>
Length of the string.
Default length = LEN(<cMemvar>).


Returns

The resulting encrypted string.


Description

The string is encrypted using the encryption key set with 
N_SETKEY().

If the source string is passed as a memory variable, the 
resulting encoded string is stored in the memory variable.
If <nLength> is specified, then the first <nLength> characters of 
the string will be encoded. If <nLength> is omitted, or if it is 
greater than the length of the string, then the entire string will be 
encoded.

Note: Encrypting or decrypting does not change the length of 
the data.


Example

// Field PASSWORD was encrypted with key '01$$23_1'
N_SETKEY('01$$23_1')
ACCEPT 'Password: ' TO cMPassword
IF N_ENCODEST(cMPassword) != PASSWORD
   ? 'User not authorized'
   QUIT
ENDIF



See Also: N_DECODEST()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson