Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122646 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 01D811AD8F6 for ; Fri, 15 Mar 2024 11:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1710502389; bh=oDXDutApt65Y8igPQuF3tWQcBdZHGfi0XFW5NCnKhMA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CoUdeLXqNE3BSY6bwsNR0Qo0E5yuKgXh9TGkQcjrezOyRC307k8Kn0afA96mEapP2 gPpSpSKzDuzbhDgkY5Mpx6P8DTRFXMBpk1Ju1ROvyImnXB3Apt8RlBlEMoS7hTpuFQ o+FXBR/85yiaQ26FjM35KHiNQX27t3EN3yT9zundK6Da64eCPM3t2Y5V4Ez9PqPFmT pB7NGtmzYidaJ5RtbHVHXMHMIjbP82vrhxoSoUwWfJzPqTXECA9LT1GT33+ALGy+4K S3K5URn4vD3uZLVjzURMkbMcOelKnh+Izb65PzWsuw8qtq7aTuaeDySo/v/azfsuDH EmkQjit8yLxPQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 06A0618007F for ; Fri, 15 Mar 2024 11:33:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 15 Mar 2024 11:33:08 +0000 (UTC) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6e6738f7535so907297a34.2 for ; Fri, 15 Mar 2024 04:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710502370; x=1711107170; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oDXDutApt65Y8igPQuF3tWQcBdZHGfi0XFW5NCnKhMA=; b=LKwgcdmi2ZZU0cyi5jJPO/NlVPThCA7/C8yYe6zT0iWVUIi05ZXUKA3IGwO9lC27Lq aS4kwguUZPmMu4qaTpuJ1BrBJckTDkqnuQzGzBT1Ims7a7E87F1mafZOnmDD72OObXXz 6KCv2AvDlvPv+il1QfBT3BfR1TkPQyRus6MCFklYUu4IEmfSs+KXdHxRQYjQF9oG81ZR XjnleU5KMyOeePrdFhzcE2VLXN6c6QTV3lQQNAzLUTlbikWavGuhbXju1aD/kZuCfRtB znDcceOvxBPfacLWnINb/0MF7jngT6Y/XOX1am91AFvjlVDTLqajD9KwCMRnSpAliUGT RynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710502370; x=1711107170; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oDXDutApt65Y8igPQuF3tWQcBdZHGfi0XFW5NCnKhMA=; b=MgP+7hOow0JCJNPsz4BJxq/Rz/k5qBqsGConZ2yZ1fb60VQI9wMAFxXTQQWyz3mIwS wQX+rVx0zSZwT9NYoHQGy7GsXIOIB3dJaa4F39dXITSEOmg/+5gpIHzensaDZob6qdNC z9VzDmX9Zad9JfJzrZD/s4rtJM/lZaguzBlSkBEYrFFVRIelrA5knNXsCI3L5kByqSyU ioH97OL12vu6lL71RI5Yc+G12+IUhB0ojDHVaA6Fbub67KgEhhB9IR/h0Wg3PWMbqZfY clFK3ynb0uAPt20PaSjf39Ur2D6I7vpY40T8kBVIK1VP3JLwqWwtkptagLrw/nF4Tojz GNIQ== X-Gm-Message-State: AOJu0YxlHjOhzMABWz/Bp982BPdIo9rYIfhrCFWyRBffm8OzWKkAjgcp poYK7epLmxjhMjPJx2HxFzDlKxM8GrWtjvTyreyg1juUTJ+sQrcseK7JyVkpBfagxRxlu92vGAc dESb7S4CY6voivuS/oNq5nnC/Eq4= X-Google-Smtp-Source: AGHT+IEPvpDR8IzNpBrSOBgbnFTiD7DVfNxEpvtPj8Tv22gqripPanVbd5ARUePCZFtihFc1nFTpWxsjK+NX0/Ggeog= X-Received: by 2002:a05:6871:2203:b0:222:1305:63b6 with SMTP id sc3-20020a056871220300b00222130563b6mr3793972oab.0.1710502369406; Fri, 15 Mar 2024 04:32:49 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <9114cbe3-2b9c-4037-856b-20afc8f96f95@FamilleCollet.com> <720a7790-76e2-43b2-8a5e-9abc5aea7d7e@FamilleCollet.com> In-Reply-To: <720a7790-76e2-43b2-8a5e-9abc5aea7d7e@FamilleCollet.com> Date: Fri, 15 Mar 2024 12:32:32 +0100 Message-ID: Subject: Re: [PHP-DEV] base64_encode without padding To: Remi Collet Cc: php internals Content-Type: multipart/alternative; boundary="0000000000001db5d50613b15e3e" From: landers.robert@gmail.com (Robert Landers) --0000000000001db5d50613b15e3e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 15, 2024 at 9:34=E2=80=AFAM Remi Collet wrote: > Le 14/03/2024 =C3=A0 21:31, Yasuo Ohgaki a =C3=A9crit : > > > Please add PHP_BASE64_URL flag also. > > This is another feature, out of the scope of this PR > > > Remi > Perhaps you should consider it? Base64 "just without" padding isn't really a standard (that I'm aware of), but url-base64 is and padding is optional. Simply removing padding (in most real-world cases) isn't enough so this flag only gets you part of the way there. So, perhaps adding two flags PHP_BASE64_URL along with this padding flag would be really useful for those of us having to transform a base64 encoded string to a url-base64. Robert Landers Software Engineer Utrecht NL --0000000000001db5d50613b15e3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Mar 15, 2024 at 9:34=E2= =80=AFAM Remi Collet <Fedora= @famillecollet.com> wrote:
Le 14/03/2024 =C3= =A0 21:31, Yasuo Ohgaki a =C3=A9crit=C2=A0:

> Please add PHP_BASE64_URL flag also.

This is another feature, out of the scope of this PR


Remi

Perhaps you should con= sider it? Base64 "just without" padding isn't really a standa= rd (that I'm aware of), but url-base64 is and padding is optional. Simp= ly removing padding (in most real-world cases) isn't enough so this fla= g only gets you part of the way there. So, perhaps adding two flags PHP_BAS= E64_URL along with this padding flag would be really useful for those of us= having to transform a base64 encoded string to a url-base64.

Robert Landers
Software Engineer
Utrecht = NL

--0000000000001db5d50613b15e3e--