/** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $bin_string (raw binary) * @return string */ public static function hexEncodeUpper(string $bin_string) : string { return Hex::encodeUpper($bin_string); }
/** * RFC 4648 Base16 decoding * * "foo" -> "666F6F" * * @param string $str * @return string */ public function base16Encode(string $str) : string { return Hex::encodeUpper($str); }