Quantcast
Channel: Server Support Forum
Viewing all articles
Browse latest Browse all 7443

[PHP] Gute Hashing-Methode?

$
0
0
Hallo,

aufgrund des aktuellen Security-Breaches bei Ubuntuforums wollte ich 'mal nachfragen:

Wie hasht ihr eure Passwörter?

Ich hashe meine Passwörter ganz simpel so:

Code:

// Function: gluehash
// Param 1: string to hash
// Returns: hashed string - So simple, isn't it?

function gluehash($_input_) {
        $return = "";
        for($i=0;$i<1000000;$i++) {
                $return = hash('sha512', $return.$_input_);
        }
        return $return;
}

wobei ein Login eines Users dann schon einen CPU-Kern auf 100% auslastet und der Hash ca. 2-2.5 Sekunden braucht.

Viewing all articles
Browse latest Browse all 7443