i need help! i would like to encrypt pass
Author |
Message |
r0ssar00
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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() |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
DanShadow
![](http://compsci.ca/v3/uploads/user_avatars/12142970654c996e83e6997.png)
|
Posted: 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 .
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. |
|
|
|
|
![](images/spacer.gif) |
|
|