⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgp-pubkey-encrypt.sql

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 SQL
字号:
---- PGP Public Key Encryption---- successful encrypt/decryptselect pgp_pub_decrypt(	pgp_pub_encrypt('Secret msg', dearmor(pubkey)),	dearmor(seckey))from keytbl where keytbl.id=1;select pgp_pub_decrypt(		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=2;select pgp_pub_decrypt(		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=3;select pgp_pub_decrypt(		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=6;-- try with rsa-sign onlyselect pgp_pub_decrypt(		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=4;-- try with secret keyselect pgp_pub_decrypt(		pgp_pub_encrypt('Secret msg', dearmor(seckey)),		dearmor(seckey))from keytbl where keytbl.id=1;-- does text-to-bytea worksselect pgp_pub_decrypt_bytea(		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=1;-- and bytea-to-text?select pgp_pub_decrypt(		pgp_pub_encrypt_bytea('Secret msg', dearmor(pubkey)),		dearmor(seckey))from keytbl where keytbl.id=1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -