Updated to use PHP 5.5 Hash API