Computer Science Canada

encryption help

Author:  con.focus [ Sat Jan 08, 2005 8:34 pm ]
Post subject:  encryption help

ok i made a password program and n encrption program
code:
var key : string (1)
var password : string := ""
var counter : int
counter := 1
loop
    put "enter a password"
    loop
        getch (key)
        exit when ord (key) = 10
        put "*" ..
        password += key
    end loop
    put ""
    if password = "t{f" then  % <= t{f my password   when encryted= :A,
        exit
    elsif counter = 3 then
        quit
    end if
    counter += +1
    password := ""
end loop
put ""
put "Welcome to CIA Headquaters"



encryption
code:
var text:string
var codeword : string

put "enter a word"
get text

for i:1..length(text)
put chr(ord(text(i))-58)..  <=== turns my t{f   to  :A,
end for
put ""


i want to merge these two to gether so when i store my encryted password in the file and when the user types in the password it encrypts the password that was typed and checks to see if it matchs
can someone one help me merge these two program

Author:  Andy [ Sat Jan 08, 2005 9:07 pm ]
Post subject: 

ever heard of functions or procedures?

Author:  con.focus [ Sat Jan 08, 2005 9:42 pm ]
Post subject: 

thx i got it working now

nvr thought or using a function thx alot


: