~ubuntu-branches/debian/experimental/postgresql-11/experimental

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/expected/pgp-compression.out

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2018-05-22 14:19:08 UTC
  • Revision ID: package-import@ubuntu.com-20180522141908-0oy9ujs1b5vrda74
Tags: upstream-11~beta1
ImportĀ upstreamĀ versionĀ 11~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--
 
2
-- PGP compression support
 
3
--
 
4
select pgp_sym_decrypt(dearmor('
 
5
-----BEGIN PGP MESSAGE-----
 
6
 
 
7
ww0ECQMCsci6AdHnELlh0kQB4jFcVwHMJg0Bulop7m3Mi36s15TAhBo0AnzIrRFrdLVCkKohsS6+
 
8
DMcmR53SXfLoDJOv/M8uKj3QSq7oWNIp95pxfA==
 
9
=tbSn
 
10
-----END PGP MESSAGE-----
 
11
'), 'key', 'expect-compress-algo=1');
 
12
 pgp_sym_decrypt 
 
13
-----------------
 
14
 Secret message
 
15
(1 row)
 
16
 
 
17
select pgp_sym_decrypt(
 
18
        pgp_sym_encrypt('Secret message', 'key', 'compress-algo=0'),
 
19
        'key', 'expect-compress-algo=0');
 
20
 pgp_sym_decrypt 
 
21
-----------------
 
22
 Secret message
 
23
(1 row)
 
24
 
 
25
select pgp_sym_decrypt(
 
26
        pgp_sym_encrypt('Secret message', 'key', 'compress-algo=1'),
 
27
        'key', 'expect-compress-algo=1');
 
28
 pgp_sym_decrypt 
 
29
-----------------
 
30
 Secret message
 
31
(1 row)
 
32
 
 
33
select pgp_sym_decrypt(
 
34
        pgp_sym_encrypt('Secret message', 'key', 'compress-algo=2'),
 
35
        'key', 'expect-compress-algo=2');
 
36
 pgp_sym_decrypt 
 
37
-----------------
 
38
 Secret message
 
39
(1 row)
 
40
 
 
41
-- level=0 should turn compression off
 
42
select pgp_sym_decrypt(
 
43
        pgp_sym_encrypt('Secret message', 'key',
 
44
                        'compress-algo=2, compress-level=0'),
 
45
        'key', 'expect-compress-algo=0');
 
46
 pgp_sym_decrypt 
 
47
-----------------
 
48
 Secret message
 
49
(1 row)
 
50