在sql server上实现一些加密算法
我们可以编写一个用户定义的函数来根据sql server 2000中的密钥加密文本字符串吗?例如,我想尝试编写三重 DES 算法来加密文本。为此如何编写语句?我在网上查了一下;我一开始就无法理解密码学的语言......
Can we write a user defined function to encrypt a string of text based on a key in sql server 2000? For e.g. I want to try writing a triple DES algorithm to encrypt text. How to write statements for this? I checked around the internet; I can't understand the language of cryptography to begin with...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
考虑升级到 SQL Server 2005 或更高版本,其中包括许多加密功能。它们使这一切变得简单:
CREATE CERTIFICATE
)CREATE SYMMETRIC KEY
)>ENCRYPTBYKEY()
)DECRYPTBYKEY()
)dotnetslackers.com 有一个 易于阅读的基础知识指南。
如果您绝对必须坚持使用 SQL Server 2000,那么您应该强烈考虑使用第三方加密包,因为从头开始编写 3DES 并非易事。 Application Security 曾经推出过一款名为“DbEncrypt”的产品,但我不知道它是否是仍然可用。
Consider upgrading to SQL Server 2005 or higher, which includes numerous encryption functions. They make it easy:
CREATE CERTIFICATE
)CREATE SYMMETRIC KEY
)ENCRYPTBYKEY()
)DECRYPTBYKEY()
)dotnetslackers.com has an easy-to-read howto on the basics.
If you absolutely must stick with SQL Server 2000, you should strongly consider a third-party package for encryption, as writing 3DES from scratch is no small task. Application Security used to put out a product called 'DbEncrypt', but I don't know if it's still available.
我刚刚找到这篇文章--> http://www.sqlservercentral.com/articles/Security/freeencryption/1980/。似乎您可以通过扩展存储过程来做到这一点。有一些第 3 方 dll 允许您执行此操作。有一个链接可以从网站下载 dll(压缩)。您必须将其添加到 sql server 的 binn 文件夹中,并调用一些脚本将其添加到扩展存储过程列表中。我不确定这是否适用于运行 64 位机器的 sql server。
I just found this article --> http://www.sqlservercentral.com/articles/Security/freeencryption/1980/. Seems you can do this via extended stored procedures. There are some 3rd party dlls which allow you to do this. There is a link to download the dlls (zipped) from the site. You have to add this to your sql server's binn folder, and call some scripts to add it to the extended stored procedures list. I not sure if this will work for sql server which runs of 64-bit machines.