I have to pass username as an unique string to a webservice, and the API is asking for the following.
- Unique string has to be converted to BASE16
- It is the BASE16 value I have to pass.
I cannot find a way to convert the value to BASE16. PHP does not seem to have a BASE16_ENCODE
like it does for BASE64.
Example:
$value = ;
$base16username = base16_encode['$value']; [< Since Base16_encode does not exist, this is my problem]
Google searches are leading me nowhere, nor is the PHP online manual so I suspect I might be overlooking something obvious. Any suggestions?
Base32
Base32 string encoder based on RFC 4648.
Installation
Via Composer
$ composer require selective/base32
Requirements
- PHP 7.1.3+
Usage