php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6812 crypt() function does not honour salt. Always return the same value.
Submitted: 2000-09-20 08:21 UTC Modified: 2000-11-03 12:23 UTC
From: johanp at aditus dot nu Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.2 OS: Linux 2.2.16
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: johanp at aditus dot nu
New email:
PHP Version: OS:

 

 [2000-09-20 08:21 UTC] johanp at aditus dot nu
The following test demostrates the problem with crypt() function.

<?php

$orgstr="abc123";
$salt=time();
$cryptstr=crypt($orgstr,$salt);

echo "orgstr=$orgstr, salt=$salt, cryptstr=$cryptstr<p>";

?>

This will return the same $cryptstr whatever the salt is.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-21 08:11 UTC] sniper@php.net
Please read http://www.php.net/manual/function.crypt.php again.
The salt string can be only 2-characters.

--Jani
 [2000-11-03 12:23 UTC] sniper@php.net
This is fixed now..it was a bug after all.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC