TGC Codebase Backup



Password encryptor by thread surfer

11th Apr 2005 8:01
Summary

This is version 2 of my password encryptor



Description

This is version 2 of my password encryptor.
NEW IN THIS VERSION
'Goodbye qwery language, in this version I have added a way to create your own language, make a file called key.txt and fill it with 36 characters starting with your a your b and so on



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `Grab the characters from the file
Dim le$(36)
OPEN TO READ 1, "key.txt"
READ STRING 1, th$
For f=1 TO 36
ph$=LEFT$(th$, f)
le$(f)=RIGHT$(ph$, 1)
NEXT f


`tell the users what to do
Print "Press space to begin"
`wait for the space key to be pressed 
DO
IF SPACEKEY()=1 THEN GOTO encrypt
LOOP
encrypt:
`clear the screen
cls
PRINT
`ask the user to input what they want to encrypt 
input "What is your password?>",a$
d=LEN(a$)
`the amazing code
FOR i= 1 TO d 
b$=LEFT$(a$, i)
c$=RIGHT$(b$, 1)
IF c$="a" THEN PRINT "char";i;" = ";le$(1)
IF c$="b" THEN PRINT "char";i;" = ";le$(2)
IF c$="c" THEN PRINT "char";i;" = ";le$(3)
IF c$="d" THEN PRINT "char";i;" = ";le$(4)
IF c$="e" THEN PRINT "char";i;" = ";le$(5)
IF c$="f" THEN PRINT "char";i;" = ";le$(6)
IF c$="g" THEN PRINT "char";i;" = ";le$(7)
IF c$="h" THEN PRINT "char";i;" = ";le$(8)
IF c$="i" THEN PRINT "char";i;" = ";le$(9)
IF c$="j" THEN PRINT "char";i;" = ";le$(10)
IF c$="k" THEN PRINT "char";i;" = ";le$(11)
IF c$="l" THEN PRINT "char";i;" = ";le$(12)
IF c$="m" THEN PRINT "char";i;" = ";le$(13)
IF c$="n" THEN PRINT "char";i;" = ";le$(14)
IF c$="o" THEN PRINT "char";i;" = ";le$(15)
IF c$="p" THEN PRINT "char";i;" = ";le$(16)
IF c$="q" THEN PRINT "char";i;" = ";le$(17)
IF c$="r" THEN PRINT "char";i;" = ";le$(18)
IF c$="s" THEN PRINT "char";i;" = ";le$(19)
IF c$="t" THEN PRINT "char";i;" = ";le$(20)
IF c$="u" THEN PRINT "char";i;" = ";le$(21)
IF c$="v" THEN PRINT "char";i;" = ";le$(22)
IF c$="w" THEN PRINT "char";i;" = ";le$(23)
IF c$="x" THEN PRINT "char";i;" = ";le$(24)
IF c$="y" THEN PRINT "char";i;" = ";le$(25)
IF c$="z" THEN PRINT "char";i;" = ";le$(26)
IF c$="1" THEN PRINT "char";i;" = ";le$(27)
IF c$="2" THEN PRINT "char";i;" = ";le$(28)
IF c$="3" THEN PRINT "char";i;" = ";le$(29)
IF c$="4" THEN PRINT "char";i;" = ";le$(30)
IF c$="5" THEN PRINT "char";i;" = ";le$(31)
IF c$="6" THEN PRINT "char";i;" = ";le$(32)
IF c$="7" THEN PRINT "char";i;" = ";le$(33)
IF c$="8" THEN PRINT "char";i;" = ";le$(34)
IF c$="9" THEN PRINT "char";i;" = ";le$(35)
IF c$="0" THEN PRINT "char";i;" = ";le$(36)
NEXT i
`THE END
DO
IF ESCAPEKEY()=1 THEN END
LOOP