Microsoft Windows 2000和更高版本公开了为每个用户或每个系统环境encryption数据的Data Protection API (DPAPI)。 调用者不提供用于encryption数据的密钥。 而是使用从用户或系统证书导出的密钥对数据进行encryption。
这个API通过ProtectedData类方便地在.NET中公开:
// Encrypts the data in a specified byte array and returns a byte array // that contains the encrypted data. public static byte[] Protect( byte[] userData,byte[] optionalEntropy,DataProtectionScope scope ) // Decrypts the data in a specified byte array and returns a byte array // that contains the decrypted data. public static byte[] Unprotect( byte[] encryptedData,DataProtectionScope scope )
Linux上是否有等效的API? 一个好处是,它可以方便地与Java集成。
如何处理NotifyIcon,发生超时(C#)后
ServiceBase.Run(数组)只在数组上开始第一个入口
c#TrimEnd删除更多需要?
使用.NETdebugging“Application.exe已停止工作”
当父窗口最小化时如何防止子窗口的最小化
COM不能启动Out-of-process .Net服务器编译为Anycpu
.NET / Mono框架目标
在屏幕上自动点击鼠标
它看起来没有比PGP更好(或更少),或者相当好的隐私 。 有PGP可用的API,我记得其他人友善地说的是Bouncy Castle 。
这是一个如何使用Bouncy Castle的例子 。
更好的API或解决方案可能可用,具体取决于您的具体需求。
Linux上的用户级密钥存储有两种选择:
GnomeKeyring
KDE钱包
这并没有解决对系统级密钥存储的需求。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。