pgcrypto 是一个 contrib模块,提供各种加密功能。
pgcrypto 于 PostgreSQL 7.1 中添加。
变更历史
- PostgreSQL 18
- PostgreSQL 15
- 仅当配置了OpenSSL支持时才会被构建 (提交 db7d1a7b)
- PostgreSQL 13
- 函数
gen_random_uuid()被转换为核心系统函数 (提交 5925e554) - 标记为
受信任的扩展(提交 eb67623c)
- 函数
- PostgreSQL 10
- 如果PostgreSQL是通过
--disable-strong-random选项编译的,gen_random_uuid()将会失败 (提交 bf723a27)
- 如果PostgreSQL是通过
- PostgreSQL 9.6 (扩展版本1.3)
- 添加了并行查询支持 (提交 0dbf3ce0)
- PostgreSQL 9.5 (扩展版本1.2)
- 添加了函数
pgp_armor_headers()(提交 32984d8f)
- 添加了函数
- PostgreSQL 9.4 (扩展版本1.1)
- 添加了函数
gen_random_uuid()(提交 e6170126)
- 添加了函数
- PostgreSQL 9.1
- PostgreSQL 8.2
- 添加了函数
gen_random_bytes()(提交 1abf76e8)
- 添加了函数
- PostgreSQL 8.1
- 实现了OpenPGP对称密钥和公钥加密,包括以下新函数 (提交 73e24318)
pgp_pub_encrypt()pgp_pub_decrypt()pgp_pub_encrypt_bytea()pgp_pub_decrypt_bytea()pgp_sym_encrypt()pgp_sym_decrypt()pgp_sym_encrypt_bytea()pgp_sym_decrypt_bytea()
- 实现了OpenPGP对称密钥和公钥加密,包括以下新函数 (提交 73e24318)
- PostgreSQL 7.2
- 添加了以下函数 (提交 2518e273)
crypt()hmac()decrypt()encrypt()gen_salt()
- 添加了以下函数 (提交 2518e273)
- PostgreSQL 7.1
- 添加 (提交 0c0dde61),最初提供哈希函数。
参考资料
- PostgreSQL文档: pgcrypto
