mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-31 18:37:26 +02:00
This was from before the hex format was available in bytea. Now we can remove the extra explicit encoding/decoding calls and rely on the default output format. Discussion: https://www.postgresql.org/message-id/flat/17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee%40enterprisedb.com
14 lines
388 B
Plaintext
14 lines
388 B
Plaintext
--
|
|
-- init pgcrypto
|
|
--
|
|
CREATE EXTENSION pgcrypto;
|
|
-- 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
|