> > PHP already offers bin2hex()/hex2bin() and base64_encode()/base64_decode().
> > This covers part, but not all, of RFC 4648.
> > 
> > I'd like to extend the coverage to include, at minimum, Base32.
> 
> What's the use case for it? Is anybody using base32 now?

I'd have a few times if the functionality had been easily available.

Please make this a single call:

str_convert_base($in, $old_base, $new_base);

"str_" because it applies in most cases to stuff not representable as a PHP
float/int.

> > I'd also like to make these functions to be written to resist cache-timing
> > attacks (i.e. when used to encode/decode encryption keys for long-term

As this requires slowing things down, this should be an extra, optional feature.
Either to the relevant functions, or more likely globally, as it does not make
much sense on a per-function level.

Sascha

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to