从 Outlook 向服务发送密码

Send password to service from Outlook

您好,我有 Outlook 插件可以向我的 WCF 服务发送请求。我遇到了一些关于 public 文件夹的问题。因此,解决它的一种方法是将用户帐户和密码保存在插件配置中(保存在系统注册表项中)。保存并发送到服务器的安全方法是什么?

您可以使用 CryptProtectData and store the data in file or registry. The data can be decrypted using CryptUnprotectData。数据以只有具有相同凭据的用户才能解密数据的方式加密,即不能从另一台计算机解密,或者当 运行 在不同 Windows 用户的安全上下文中时。

Microsoft 本身使用这些函数在 Outlook 中存储 POP3/IMAP4/SMTP 帐户的凭据。