PHP :: Bug #12745 :: problem with the randomic generation of salt when a use crypt("pass")
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12745 problem with the randomic generation of salt when a use crypt("pass")
Submitted: 2001-08-14 19:40 UTC Modified: 2001-08-18 21:54 UTC
From: marcus at marcusvinicius dot f2s dot com Assigned:
Status: Not a bug Package: *Encryption and hash functions
PHP Version: 4.0.6 OS: Linux Slackware 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marcus at marcusvinicius dot f2s dot com
New email:
PHP Version: OS:

 

 [2001-08-14 19:40 UTC] marcus at marcusvinicius dot f2s dot com
problem with the randomic generation of salt when a use $string = crypt("11lei11lao11") it allways generates a salt ( the first 2 chars from encrypted string ) that if use crypt("11lei11lao11blablabla") would work, and also crypt("11lei11lao11anythingwouldworkhere").

the code is

$cryptedpass = crypt("11lei11lao11");
if (crypt ( "11lei11lao11anythingwouldworkhere", substr ( $cryptedpass, 0, 2)) == $cryptedpass) {    
  echo "this is extremely strange for me";
}

and this works with this pass but not whit others!!!!!!!!!!!!!!!!!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-15 03:25 UTC] sniper@php.net
So what is the 'bug' here??

--Jani

 [2001-08-18 21:54 UTC] sniper@php.net
No feedback and this is not a bug.
This is how DES encryption works.

--Jani

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Aug 21 02:01:28 2018 UTC