mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add missing pgcrypto files.
This commit is contained in:
26
contrib/pgcrypto/expected/crypt-des.out
Normal file
26
contrib/pgcrypto/expected/crypt-des.out
Normal file
@ -0,0 +1,26 @@
|
||||
--
|
||||
-- crypt() and gen_salt(): crypt-des
|
||||
--
|
||||
select crypt('', 'NB');
|
||||
crypt
|
||||
---------------
|
||||
NBPx/38Y48kHg
|
||||
(1 row)
|
||||
|
||||
select crypt('foox', 'NB');
|
||||
crypt
|
||||
---------------
|
||||
NB53EGGqrrb5E
|
||||
(1 row)
|
||||
|
||||
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;
|
||||
worked
|
||||
--------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
drop table ctest;
|
Reference in New Issue
Block a user