| От | Miles Keaton |
|---|---|
| Тема | how to encode/encrypt a string |
| Дата | |
| Msg-id | 59b2d39b040930083654ef54d@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: how to encode/encrypt a string
|
| Список | pgsql-general |
still doing my switch from MySQL to PgSQL, and can't figure out what
the comparable function would be for this:
In MySQL, to store a big secret (like a credit card number) in the
database that I didn't want anyone to be able to see without knowing
the salt/password value, I would do this into a blob-type field:
INSERT INTO clients(ccnum) VALUES (ENCODE(''433904123121309319', 'xyzzy'));
Then it would be stored as binary jumble in the database, only able to
be decoded with my "xyzzy" password.
SELECT DECODE(ccnum, 'xyzzy') FROM clients;
How would I do this same thing in PostgreSQL?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера