| От | Daniel Verite |
|---|---|
| Тема | Re: Feistel cipher, shorter string and hex to int |
| Дата | |
| Msg-id | 2c80afeb-7251-4b11-936d-a2b02dd61c1b@mm обсуждение исходный текст |
| Ответ на | Feistel cipher, shorter string and hex to int (Ivan Sergio Borgonovo <mail@webthatworks.it>) |
| Ответы |
Re: Feistel cipher, shorter string and hex to int
|
| Список | pgsql-general |
Ivan Sergio Borgonovo wrote: > r2:=l1 # ((((1366.0*r1+150889)%714025)/714025.0)*32767)::int; > -- but what about this? where does it come from? This function: (1366.0*r1+150889)%714025 implements a known method to get random numbers. I think it comes from "Numerical recipes" by William Press. Note that the algorithm is not tied to that function, it could be replaced by something else (especially one that involves a private key), but it has to be carefully chosen or the end result won't look so random. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера