Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Generate a password hash

    Hello all!

    I'd like to know how does Zen Cart generate the password hashes that are stored for every user in the 'customers' table in the database. I tried a simple MD5 hash of the password, but that doesn't quite seem to work.

    Thanks in advance.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Generate a password hash

    PHP Code:
      function zen_encrypt_password($plain) {
        
    $password '';

        for (
    $i=0$i<10$i++) {
          
    $password .= zen_rand();
        }

        
    $salt substr(md5($password), 02);

        
    $password md5($salt $plain) . ':' $salt;

        return 
    $password;
      } 
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. v139h MD5 hash key too long - but no hash
    By shqipo in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 9 Mar 2013, 05:13 AM
  2. Password MD5 HASH in DB.
    By rabbie in forum General Questions
    Replies: 8
    Last Post: 15 Mar 2007, 12:08 PM
  3. Password Generate on Create Account
    By a_berezin in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Mar 2007, 01:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg