加密和解密数字与.NET [英] Encrypting and Decrypting Numbers with .NET
问题描述
什么是(用C#)可与.NET加密技术。我这里有一个数字值,我想要加密的字符串重新presentation。哪一个已解密的支持?
What are Encryption techniques available with .NET (using C#). I have a numeric value with me which I want to encrypt to a string representation. Which one has decrypting support ?
推荐答案
加密(这是由.NET框架/ BCL提供的,而不是C#语言)通常适用于字节。但是,这是罚款;数字是很容易重新present为字节,输出字节可以通过 Convert.ToBase64String
写一个字符串。
Encryption (which is provided by the .NET framework / BCL, not C# the language) typically works on bytes. But that is fine; numbers are easy to represent as bytes, and the output bytes can be written as a string via Convert.ToBase64String
.
所以,所有的人,间接......
So "all of them, indirectly"...
请参阅 System.Security.Cryptography
在MSDN
See System.Security.Cryptography
on MSDN
(重新解密:一个的加密的进行解密;一个的散的不能(希望),所以只要你不看散列函数,你应该精)
(re decrypting: an encryption can be decrypted; a hash cannot (hopefully); so as long as you don't look at hashing functions, you should be fine)
这篇关于加密和解密数字与.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!