在PostgreSQL中加密数据 [英] Encrypt the datas in postgresql

查看:597
本文介绍了在PostgreSQL中加密数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是PostgreSQL的初学者。现在,我正在使用Windows Server 2008 OS中安装的PostgreSQL 9.3版本。我打算加密用户表中的数据。我已经浏览了大多数与之相关的网站,但是我并不清楚,加密功能也不起作用。在执行此查询时出现错误。

I am beginner in PostgreSQL. Right now, I am using PostgreSQL 9.3 Version installed in Windows Server 2008 OS. I am planing to encrypt the data in user table. I have go through most of the web sites related that, but I did not get clear idea and also encrypt function is not working. I getting error while execute this query.

select encrypt('123456789012345','1234','aes');. 

错误消息:错误:函数加密(未知,未知,未知)确实不存在

有人可以帮我解决这个问题。

Can anyone help me to solve this issue.

注意,
RAM

Regards, RAM

推荐答案

您可能需要

CREATE EXTENSION pgcrypto;

首先。

但是,加密事物不会使它们以某种方式安全。请不要以为仅加密数据就能真正达到您要达到的安全目标。

However, encrypting things doesn't make them somehow "secure". Please don't assume that simply encrypting the data will actually achieve the security goal(s) you're trying to achieve.

请参阅:

  • Storing encrypted data in Postgres
  • https://dba.stackexchange.com/q/24370/7788
  • https://dba.stackexchange.com/q/59154/7788

...还有许多其他内容。

... and many others.

这篇关于在PostgreSQL中加密数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆