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

Username:   Password: 
 RegisterRegister   
 i need help! i would like to encrypt pass
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
r0ssar00




PostPosted: Thu Oct 14, 2004 10:04 am   Post subject: i need help! i would like to encrypt pass

currently in my login script, my password is numeric only, i would like to make it alphanumeric, with letters, to encrypt it, i would like to turn it into numbers using strint, but every attempt i have done failed, after useing strint, i would mess with the numbers and put it into a file, then i would unmess the numbers and use intstr

my question, how would i use strint and instr because it wont work for me
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Oct 14, 2004 3:10 pm   Post subject: (No subject)

well intstr() and strint() just work with integers. alphanumerics wouldn't do..

although encryption is done as ASCII value level, so you should look into ord() and chr()
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DanShadow




PostPosted: Fri Oct 15, 2004 1:34 pm   Post subject: (No subject)

Or, if you want to get very inventive....setup a little code system.
like:
code:

a= 294
b= 148
c= 492
y=283
h=193
p=934
.....
4= dkj
8= awe

So make a character equal to a random three (or more) digit number, and a number equal to a three letter nonsensive word. Record all these, when you save into to a file (for ex a game) do something like this
(Assuming my char name is Cabby and password equals bach4)
Filename= 'Cabby.sav'
Encrypted File:
[FILE]
492 294 148 148 283
148 294 492 193 dkj
[END FILE]
De-encrypted File:
[FILE]
c a b b y
b a c h 4
[END FILE]

Get what I mean? It would take quite awhile for someone (for whatever reason) who wanted to hack through your encrypted file. The more digits, the harder Wink .
And to read this...do something like this:
code:

var code:array 1..20 of string
var datafile:int:=0
var temp,encrypt:string:=""
open:datafile,"cabby.sav",get
for i:1..eof(datafile)
get:datafile,temp(i)
encrypt+=temp
end for
for i:1..length(encrypt)
code(i):= /*blah blah*/
end for

I dont wanna give it all away, so basically...if you want to encrypt it, that method works.
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: