Re: Patch to eliminate duplicate b64 code from pgcrypto

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: Patch to eliminate duplicate b64 code from pgcrypto
Дата
Msg-id e51f66da0812171549j52c25fd1r6cec570cf5a49907@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch to eliminate duplicate b64 code from pgcrypto  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On 12/16/08, Bruce Momjian <bruce@momjian.us> wrote:
>  Would someone who understand pgcrypto please review this?

>  Marc Munro wrote:
> > I am attaching a patch to eliminate duplicate b64_encode and decode
>  > functions from pgcrypto, and to expose those functions for use by
>  > add-ins (I want to use them in Veil).

Although your patch achieves the goal, it may make more sense to export
pg_find_encoding() and struct pg_encoding, thus making all encoding
algorithms available externally.

>  > The patch was made against CVS head today.  It compiles and tests
>  > successfully.  Though I was unable to run pgrypto regression tests, I
>  > did give the b64 encoding a sanity check.
>  >
>  > I also added a b64_char() function that is now used from pgcrypto.  This
>  > allowed me to remove the duplicate _base64 character array.

I think this can be avoided by using plain b64_encode() for those 3 bytes.
That step is really not speed critical.

-- 
marko


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Summary: changes needed in function defaults behavior
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Summary: changes needed in function defaults behavior