Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 encryption help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
con.focus




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Sat Jan 08, 2005 9:07 pm   Post subject: (No subject)

ever heard of functions or procedures?
con.focus




PostPosted: Sat Jan 08, 2005 9:42 pm   Post subject: (No subject)

thx i got it working now

nvr thought or using a function thx alot
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: