2001-10-01 18:12:23 +02:00
|
|
|
--
|
|
|
|
-- init pgcrypto
|
|
|
|
--
|
2011-02-14 02:06:41 +01:00
|
|
|
CREATE EXTENSION pgcrypto;
|
2005-03-21 06:24:52 +01:00
|
|
|
-- check error handling
|
|
|
|
select gen_salt('foo');
|
|
|
|
ERROR: gen_salt: Unknown salt algorithm
|
|
|
|
select digest('foo', 'foo');
|
|
|
|
ERROR: Cannot use "foo": No such hash algorithm
|
|
|
|
select hmac('foo', 'foo', 'foo');
|
|
|
|
ERROR: Cannot use "foo": No such hash algorithm
|
|
|
|
select encrypt('foo', 'foo', 'foo');
|
|
|
|
ERROR: Cannot use "foo": No such cipher algorithm
|