|
|
|
06-03-1999, 02:04 PM
|
Postid: 42651
|
|
Fond of TAZ
Join Date: Feb 1999
Posts: 919
|
Encrypt / Decrypt Unsupported Function?
I'm just trying a few things with encrypt() and decrypt() in PHP, and I'm getting Unsupported function errors referencing them?
Here's the code:
Code Sample:
<?
$mess = "just a message";
$passwd = "password";
$data = encrypt($mess,0,$passwd);
print(decrypt($data,0,$passwd));
?>
|
|
Is there anything obviously wrong? Thanks
Sneaky
|
|
|
06-03-1999, 02:38 PM
|
Postid: 42652
|
|
Fond of TAZ
Join Date: Feb 1999
Posts: 919
|
I just RTFM, and noticed that it doesn't even list functions for encrypt or decrypt, just crypt, although the book demonstrates uses of all three. 
|
|
|
06-03-1999, 05:43 PM
|
Postid: 42653
|
|
Visitor
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
|
crypt() is a one way street and I *think* it's the same as htpasswd's encryption (using Unix/Linux crypt function). Encrypt and decrypt I think are part of a library or module or something...
Also note that on Windows, crypt() does squat
------------------
Justin Nelson
FutureQuest Support
|
|
|
06-03-1999, 06:59 PM
|
Postid: 42654
|
|
Registered User
Join Date: Mar 1999
Location: Seattle, WA
Posts: 1,059
|
Justin: Even with the crypt module enabled?
------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/
|
|
|
06-03-1999, 08:37 PM
|
Postid: 42655
|
|
Visitor
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
|
I tried that on my system, and it still will not work... I'm not sure why, but I do know that for .htaccess protected directories there is no encryption on the passwords (which sucks) - I'm sure NT has some form of encryption... then again, maybe not...
------------------
Justin Nelson
FutureQuest Support
|
|
|
06-03-1999, 10:20 PM
|
Postid: 42656
|
|
Fond of TAZ
Join Date: Feb 1999
Posts: 919
|
Yeah, for now, I'm just crypting a person's password with a salt and storing it in a file. When they need access again, I'll encrypt their password and compare it to the encrypted password in the file. The only problem (or feature) is that you can't decrypt a password using crypt(). I think its just standard DES encryption, isn't it?
|
|
|
06-03-1999, 10:38 PM
|
Postid: 42657
|
|
CTO FutureQuest, Inc.
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
|
nope... crypt() was designed to be a one-way hash, with no decryption methods other than brute force... crypt is pretty darn good that there are no known cryptoanalysis methods to undo it...
In parlance, it has 4092 permutations driven by the salt and takes brute force (stepping through every possible value) to find the plaintext... You can also run dictionaries against it, as most people use common words...
Even corrupted (b0rk3d) passwords don't stand up well to dictionary cracks, cause most of the crackers are coded specifically to h4nd13 such w0rd5...
--
Terra
--Official member of the rat race--
FutureQuest
|
|
|
06-04-1999, 02:34 AM
|
Postid: 42658
|
|
CTO FutureQuest, Inc.
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
|
|
|
|
06-04-1999, 08:50 AM
|
Postid: 42659
|
|
Fond of TAZ
Join Date: Feb 1999
Posts: 919
|
There's (sort of) a BUG in the BOOK?
Thanks Terra!
Sneaky
|
|
|
06-04-1999, 01:42 PM
|
Postid: 42662
|
|
Fond of TAZ
Join Date: Feb 1999
Posts: 919
|
Thanks, I think just crypt() will work for now, and I'll take a look into PGP later.
I've got some governement nuclear bomb designs I'm trying to smuggle to China.
Sneaky
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:35 AM.
|
| |
|
|
|