什么是.NET中的短字符串加密的最佳方法? [英] What's the best way to encrypt short strings in .NET?
问题描述
我的老板要我来加密数据传输过程中使用的一些信息。个别字符串加密有二十间八字符。一个单一的密码必须用于加密和解密,所以我需要一个对称alogrithm。我不希望推出自己的 - 我想用一个从C#内置.NET
My boss wants me to encrypt some information used during data transfer. The individual strings to be encrypted are between eight and twenty characters long. A single password must be used to encrypt and decrypt so I need a symmetric alogrithm. I don't want to roll my own - I want to use one built into .NET from C#.
那么,哪种算法是最好的?
So, which algorithm is best?
推荐答案
TripleDes的?
TripleDes ?
您可以使用<一个href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.tripledescryptoserviceprovider.aspx"相对=nofollow> System.Security.Cryptography.TripleDESCryptoServiceProvider
You can use the System.Security.Cryptography.TripleDESCryptoServiceProvider
小金额code到encrypy /解密......不正是它在锡说:)
Small amount of code to encrypy/decrypt... does exactly what it says on the tin :)
这篇关于什么是.NET中的短字符串加密的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!