Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近遇到了 SecureString,但正如你们大多数人所知,您将无法使用它,因为您想要使用的大多数函数都接受字符串作为参数,而不是 SecureString。
那么如何使用 SecureString 呢?
如果我需要跨多个程序传递字符串,如果字符串是敏感信息,那么与纯字符串相比,字节数组是否更安全?
如果数据是敏感数据,请对其进行加密。
查看System.Security.Cryptography命名空间。
System.Security.Cryptography
支持多种加密算法,但无法向您建议使用哪一种,因为您的情况的具体安全要求尚不清楚。