是否可以在ApplicationServices DB中对电子邮件地址进行加密? [英] Is it possible to have email addresses encrypted in ApplicationServices DB?

查看:123
本文介绍了是否可以在ApplicationServices DB中对电子邮件地址进行加密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了提高安全性,以便在我正在处理的项目中将电子邮件地址保密,我希望对存储在数据库中的所有电子邮件进行加密.但是,我们使用的是Asp.Net成员资格提供程序,并且电子邮件在表aspnet_Membership的电子邮件"列中以明文显示.他们是实现这一目标的方法吗?理想情况下,这是一种简单的方法.

For additional security to keep email addresses private in a project I am working on, I would like to have all emails stored in our database encrypted. However, we are using the Asp.Net Membership provider, and emails appear in clear text in the Email column of table aspnet_Membership. Is their way to achieve this? Ideally, a simple way.

推荐答案

我将创建一个自定义提供程序,只需添加少量代码即可加密电子邮件地址.

I would create a custom provider and just add the small amount of code to encrypt the email address.

他们发布了ASP.net提供程序的源代码

they released source for the ASP.net Provider

http://weblogs.asp.net/scottgu/存档/2006/04/13/442772.aspx

如果您下载ProviderToolkitSamples.msi

if you download the ProviderToolkitSamples.msi

在第366行使用SQLMembershipProvider.cs作为成员资格提供程序,它存储的电子邮件地址可以在调用插入存储过程之前对其进行加密.

Use the SQLMembershipProvider.cs for the membership provider on line 366 it is storing the email address you can encrypt it before calling the insert stored procedure.

从数据库中检索它时,您还需要解密它.

you will also need to decrypt it when retrieving it from the DB as well .

这是一篇有关加密的好文章,我将确保您在电子邮件地址中包含一个Salt,以确保其安全性.

Here is a good article on Encryption I would make sure you include a Salt with the email address so that it is more secure.

http://hectorcorrea.com/blog/加密并解密C-Sharp中的字符串

希望有帮助!

这篇关于是否可以在ApplicationServices DB中对电子邮件地址进行加密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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