Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9a78cfc

Browse files
committed
Add new file.
1 parent 484a0fa commit 9a78cfc

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

contrib/pgcrypto/pgcrypto.sql

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
-- drop function digest(bytea, text);
3+
-- drop function digest_exists(text);
4+
-- drop function hmac(bytea, bytea, text);
5+
-- drop function hmac_exists(text);
6+
-- drop function crypt(text, text);
7+
-- drop function gen_salt(text);
8+
-- drop function gen_salt(text, int4);
9+
-- drop function encrypt(bytea, bytea, text);
10+
-- drop function decrypt(bytea, bytea, text);
11+
-- drop function encrypt_iv(bytea, bytea, bytea, text);
12+
-- drop function decrypt_iv(bytea, bytea, bytea, text);
13+
-- drop function cipher_exists(text);
14+
15+
16+
17+
CREATE FUNCTION digest(bytea, text) RETURNS bytea
18+
AS '$libdir/pgcrypto',
19+
'pg_digest' LANGUAGE 'C';
20+
21+
CREATE FUNCTION digest_exists(text) RETURNS bool
22+
AS '$libdir/pgcrypto',
23+
'pg_digest_exists' LANGUAGE 'C';
24+
25+
CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea
26+
AS '$libdir/pgcrypto',
27+
'pg_hmac' LANGUAGE 'C';
28+
29+
CREATE FUNCTION hmac_exists(text) RETURNS bool
30+
AS '$libdir/pgcrypto',
31+
'pg_hmac_exists' LANGUAGE 'C';
32+
33+
CREATE FUNCTION crypt(text, text) RETURNS text
34+
AS '$libdir/pgcrypto',
35+
'pg_crypt' LANGUAGE 'C';
36+
37+
CREATE FUNCTION gen_salt(text) RETURNS text
38+
AS '$libdir/pgcrypto',
39+
'pg_gen_salt' LANGUAGE 'C';
40+
41+
CREATE FUNCTION gen_salt(text, int4) RETURNS text
42+
AS '$libdir/pgcrypto',
43+
'pg_gen_salt_rounds' LANGUAGE 'C';
44+
45+
CREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea
46+
AS '$libdir/pgcrypto',
47+
'pg_encrypt' LANGUAGE 'C';
48+
49+
CREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea
50+
AS '$libdir/pgcrypto',
51+
'pg_decrypt' LANGUAGE 'C';
52+
53+
CREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
54+
AS '$libdir/pgcrypto',
55+
'pg_encrypt_iv' LANGUAGE 'C';
56+
57+
CREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
58+
AS '$libdir/pgcrypto',
59+
'pg_decrypt_iv' LANGUAGE 'C';
60+
61+
CREATE FUNCTION cipher_exists(text) RETURNS bool
62+
AS '$libdir/pgcrypto',
63+
'pg_cipher_exists' LANGUAGE 'C';
64+
65+

0 commit comments

Comments
 (0)