Re: encode/decode support for base64url

Поиск
Список
Период
Сортировка
От Florents Tselai
Тема Re: encode/decode support for base64url
Дата
Msg-id CA+v5N423WDLNVg_VoQGSZqFnH6zATdd483x0+ApuMx0E8xRbnA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: encode/decode support for base64url  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: encode/decode support for base64url
Список pgsql-hackers



On Mon, Mar 10, 2025, 14:32 Daniel Gustafsson <daniel@yesql.se> wrote:
> On 10 Mar 2025, at 12:28, Florents Tselai <florents.tselai@gmail.com> wrote:

> Here's a C implementation for this, along with some tests and documentation.
> Tests are copied from cpython's implementation of urlsafe_b64encode and urlsafe_b64decode.

+         <function>base64url_encode</function> ( <parameter>input</parameter> <type>bytea</type> )

Shouldn't this be modelled around how base64 works with the encode() and
decode() functions, ie encode('123\001', 'base64')?

        https://www.postgresql.org/docs/devel/functions-binarystring.html

--
Daniel Gustafsson

Oh well - you're probably right.
I guess I was blinded by my convenience.
Adding a 'base64url' option there is more appropriate.


В списке pgsql-hackers по дате отправления: