algorithm = $algorithm; } public function getRandomBytes($bytecount) { $result = ''; $hash = mt_rand(); for ($i = 0; $i < $bytecount; $i++) { $hash = hash($this->algorithm, $hash.mt_rand(), true); $result .= $hash[mt_rand(0, strlen($hash)-1)]; } return $result; } public function isCryptographicallySecure() { return false; } }