mirror of https://github.com/postgres/postgres
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
356 B
18 lines
356 B
![]()
24 years ago
|
--
|
||
|
-- crypt() and gen_salt(): crypt-des
|
||
|
--
|
||
|
|
||
|
select crypt('', 'NB');
|
||
|
|
||
|
select crypt('foox', 'NB');
|
||
|
|
||
|
create table ctest (data text, res text, salt text);
|
||
|
insert into ctest values ('password', '', '');
|
||
|
|
||
|
update ctest set salt = gen_salt('des');
|
||
|
update ctest set res = crypt(data, salt);
|
||
|
select res = crypt(data, res) as "worked" from ctest;
|
||
|
|
||
|
drop table ctest;
|
||
|
|