|
Posted by frizzle on 01/25/06 01:20
Hi there,
I need an encrypting function, but haven't got a clue where to start.
First a string has to be encrypted with two different encryption keys.
Both output should be anything a-z / A-Z / 0-9 with a fixed length
(e.g. 20 chars).
(Preferably the encryption keys should pick chars from a string i give
them,
to prevent l's and 1's, o's and 0's etc.)
Then they get inputted again ( say $_POST['name'] and $_POST['code'] )
and i have to decrypt them. I know $_POST['name'] should use
decode/encode-key 1,
and $_POST['code'] should use decode/encode-key 2.
Decoded they should be the same again.
(Example below.)
I hope it's kind of clear ...
Greetings frizzle.
-------- EXAMPLE --------
Input : foobar
Output key 1 : klKpUR867Biwr742gsBd
Output key 2 : 9KdfnbDSnd65sgh45hsd
$_POST['name'] : klKpUR867Biwr742gsBd
$_POST['code'] : 9KdfnbDSnd65sgh45hsd
Result : foobar ( $_POST['name'] === $_POST['code'] )
Navigation:
[Reply to this message]
|