Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypting and Decrypting Numbers with .NET

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 ?

like image 998
Shyju Avatar asked Dec 10 '22 20:12

Shyju


1 Answers

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"...

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)

like image 165
Marc Gravell Avatar answered Dec 14 '22 02:12

Marc Gravell