Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91964 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96758 invoked from network); 27 Mar 2016 01:55:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2016 01:55:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=sascha.schumann@myrasecurity.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sascha.schumann@myrasecurity.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain myrasecurity.com designates 185.85.3.44 as permitted sender) X-PHP-List-Original-Sender: sascha.schumann@myrasecurity.com X-Host-Fingerprint: 185.85.3.44 mailoutb.myrasec.de Received: from [185.85.3.44] ([185.85.3.44:12097] helo=mailoutb.myrasec.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/F2-03797-28D37F65 for ; Sat, 26 Mar 2016 20:55:17 -0500 Date: Sun, 27 Mar 2016 03:55:10 +0200 (CEST) To: Stanislav Malyshev , PHP Internals , Scott Arciszewski Message-ID: <105488689.506.427e4c07-ed66-4bbb-aea2-097c92d2538e.open-xchange@myra232.schumann.net> In-Reply-To: <56F7398A.5050002@gmail.com> References: <56F7398A.5050002@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.0-Rev6 X-Originating-Client: open-xchange-appsuite Subject: Re: [PHP-DEV] [RFC] RFC4648 encoding From: sascha.schumann@myrasecurity.com (Sascha Schumann) > > 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