MS Access 2016解密字段已在链接的ODBC SQL Server表中加密
我需要在SQL Server数据库表中加密SSN(NVARCHAR(25))字段。加密后,访问程序需要能够解密用户查看/报告打印编辑等的字段,等... 数据输入或编辑后需要保存该值。
感谢您对此的任何帮助。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我正确理解您的问题,听起来数据是在使用ODBC(在MS访问中)查看的SQL Server中混淆的,您希望能够正确查看SSN的。如果是这种情况,您可能需要获得SQL Server的DBA,以便为您提供适当的权限。 DBA应该能够使用:向DBUSER授予UNMASK。
If I am understanding your issue correctly it sounds like the data was obfuscated in the SQL server which you are using ODBC (in MS Access) to look at, and you want to be able to see the SSN's properly. If that is the case, you will likely need to get the DBA for the SQL server to give you appropriate permissions. The DBA should be able to use: GRANT UNMASK TO dbuser.
如果您从访问应用程序中控制该过程 - 读取和编写加密的SSN值 - 您可以使用我的函数
加密
和decrypt
:加密值将存储base64编码。如果您希望将值存储二进制,则可以使用类似的功能。
完整文档:
使用二进制存储为Microsoft NG密码学(CNG)API
完整代码:。
If you control the process from your Access application - both read and write the encrypted SSN value - you can use my functions
Encrypt
andDecrypt
:The encrypted value will be stored Base64 encoded. Similar functions are at hand, should you prefer to store the values binary.
Full documentation:
Encryption in VBA using the Microsoft NG Cryptography (CNG) API
Using binary storage to serve the Microsoft NG Cryptography (CNG) API
Full code: VBA.Cryptography.