It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
/*
* Copyright 2014 Jayson Strickland.
* The right to use, modify and distribute this code is hereby granted provided this notice is left in tact.
* You may not claim authorship, but aside from this notice, no attribution is required if this code is used
* as part of a larger program.
*/
class Hash
{
function hash_password($password, $cost, $salt = null)
{
// define result array
$result = array();
if ($salt == null)
{
// generate a new salt
$result['salt'] = substr(hash('sha256', uniqid('', true) . mt_rand(0, mt_getrandmax())), 0, 32);
$salt = $result['salt'];
}
// create an initial hash
$result['hash'] = hash('whirlpool', $salt . $password);
// apply Whirlpool for 1/2 of specified rounds
for ($i = 0; $i <= ($cost / 2) - 1; $i++)
{
$result['hash'] = hash('whirlpool', $salt . $result['hash']);
}
// apply sha-256 for 1/2 of specified rounds
for ($i = 0; $i <= $cost / 2; $i++)
{
$result['hash'] = hash('sha512', $salt . $result['hash']);
}
// return an array containing the salt and final hash
return $result;
}
}