MediaWiki
REL1_24
|
00001 <?php 00030 class MWSaltedPassword extends ParameterizedPassword { 00031 protected function getDefaultParams() { 00032 return array(); 00033 } 00034 00035 protected function getDelimiter() { 00036 return ':'; 00037 } 00038 00039 public function crypt( $plaintext ) { 00040 if ( count( $this->args ) == 0 ) { 00041 $this->args[] = MWCryptRand::generateHex( 8 ); 00042 } 00043 00044 $this->hash = md5( $this->args[0] . '-' . md5( $plaintext ) ); 00045 } 00046 }