How does .NET create a SHA1 hash?

Are there any built-in methods for this? What arguments does he expect?

+3
source share
1 answer

per MSDN

byte[] data = new byte[DATA_SIZE];
byte[] result; 

SHA1 sha = new SHA1CryptoServiceProvider(); 
// This is one implementation of the abstract class SHA1.
result = sha.ComputeHash(data);
+7
source

Source: https://habr.com/ru/post/1704291/


All Articles