summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/expected/pgp-compression_1.out
blob: 8a046d84964e81cb6e474ff394a28e85d3ac8099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--
-- 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');
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers
HINT:  You need to rebuild PostgreSQL using --enable-strong-random
select pgp_sym_decrypt(
	pgp_sym_encrypt('Secret message', 'key', 'compress-algo=1'),
	'key', 'expect-compress-algo=1');
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers
HINT:  You need to rebuild PostgreSQL using --enable-strong-random
select pgp_sym_decrypt(
	pgp_sym_encrypt('Secret message', 'key', 'compress-algo=2'),
	'key', 'expect-compress-algo=2');
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers
HINT:  You need to rebuild PostgreSQL using --enable-strong-random
-- 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');
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers
HINT:  You need to rebuild PostgreSQL using --enable-strong-random