Either https://github.com/paragonie/constant_time_encoding or https://github.com/defuse/php-encryption/blob/master/src/Encoding.php could be used as a Userland implementation.