Re: Converting BYTEA from/to BIGINT

Поиск
Список
Период
Сортировка
От Vincenzo Romano
Тема Re: Converting BYTEA from/to BIGINT
Дата
Msg-id AANLkTingQ=Co21qTGUqd0XHyP37pp2qApiSZZHXeiN15@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Converting BYTEA from/to BIGINT  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-general
2010/7/27 Dimitri Fontaine <dfontaine@hi-media.com>:
> Vincenzo Romano <vincenzo.romano@notorand.it> writes:
>> Now, why doing this?
>> I am using a plain SEQUENCE to create a (kind of) "session ID". That
>> is simple but predictable.
>> The idea is to use this function in conjunction with encrypt (from
>> pgcrypto) and the blowfish algorithm
>> to make that sequence numbers somehow unpredictable.
>> I'm pretty sure there are better (or at least easier) solutions out
>> there, but there needs to be also some fun
>> in here.
>
> I think you'd be interested into the following:
>
>  http://wiki.postgresql.org/wiki/Pseudo_encrypt

That solution has a limit I knew about: it only generates 31-bit values.
I could "easily" trick it to handle 62-bit. Then I decided to play that game ...
--
Vincenzo Romano
NotOrAnd Information Technologies
NON QVIETIS MARIBVS NAVTA PERITVS

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Integral PG DB replication
Следующее
От: Ravi Katkar
Дата:
Сообщение: resultset metadata libpq