I'm trying to call
echo bintohex(random_bytes(30));
But my logs show
PHP Fatal error: Call to undefined function bintohex()
PHP 5.6.17
Apache 2.2.15
CentOS 6.7
Mcrypt 2.5.8 (installed and verified on phpinfo() page)
extension=mcrypt.so (present)
Any ideas why I can't find bintohex() or random_bytes() functions?
Because it bin2hex http://php.net/manual/en/function.bin2hex.php not "bintohex"
random_bytes basically exist only in Php 7 according to docs http://php.net/random_bytes but here is polyfill to 5.x version https://github.com/paragonie/random_compat