mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add missing pgcrypto files from previous commit.
This commit is contained in:
50
contrib/pgcrypto/expected/pgp-compression.out
Normal file
50
contrib/pgcrypto/expected/pgp-compression.out
Normal file
@ -0,0 +1,50 @@
|
||||
--
|
||||
-- PGP compression support
|
||||
--
|
||||
select pgp_sym_decrypt(dearmor('
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
ww0ECQMCsci6AdHnELlh0kQB4jFcVwHMJg0Bulop7m3Mi36s15TAhBo0AnzIrRFrdLVCkKohsS6+
|
||||
DMcmR53SXfLoDJOv/M8uKj3QSq7oWNIp95pxfA==
|
||||
=tbSn
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'key', 'expect-compress-algo=1');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message
|
||||
(1 row)
|
||||
|
||||
select pgp_sym_decrypt(
|
||||
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=0'),
|
||||
'key', 'expect-compress-algo=0');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message
|
||||
(1 row)
|
||||
|
||||
select pgp_sym_decrypt(
|
||||
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=1'),
|
||||
'key', 'expect-compress-algo=1');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message
|
||||
(1 row)
|
||||
|
||||
select pgp_sym_decrypt(
|
||||
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=2'),
|
||||
'key', 'expect-compress-algo=2');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message
|
||||
(1 row)
|
||||
|
||||
-- level=0 should turn compression off
|
||||
select pgp_sym_decrypt(
|
||||
pgp_sym_encrypt('Secret message', 'key',
|
||||
'compress-algo=2, compress-level=0'),
|
||||
'key', 'expect-compress-algo=0');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message
|
||||
(1 row)
|
||||
|
Reference in New Issue
Block a user