- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
/**
* Hash a value according to FraudRecord specifications
*
* @param string $value
* @param bool $prepare password is treated differently
* @return string
*/
function hash($value, $prepare = true)
{
if($prepare) {
$value = trim($value);
$value = strtolower($value);
$value = str_replace(" ", "", $value);
}
for($i = 0; $i < 32000; $i++)
$value = sha1("fraudrecord-".$value);
return $value;
}