encryption code

Posted by vikaetta on 14-Nov-2008 05:42

i want to write a program that first authenticate a user by first converting a static string of characters to a decimal number generated by the program which a user will then use to run a program.

please assist.

All Replies

Posted by ChUIMonster on 01-Dec-2008 06:25

This meets or exceeds your stated requirements:

define variable inputString as character no-undo.

define variable encryptedDecimal as decimal no-undo.

define variable i as integer no-undo.

update inputString.

do i = 1 to length( inputString ):

encryptedDecimal = encryptedDecimal + asc( substring( inputString, i, 1 )).

end.

display encryptedDecimal.

Posted by vikaetta on 01-Dec-2008 08:27

Thanks for the help it works

This thread is closed