HS Banner
Back
SHA512 Class

Author: Admin 03/30/2021
Language: C#
Views: 306
Tags: sha512


Description:

This is the SHA512 HASH using the System.Security.Cryptography.HashAlgorithm.

Article:

SHA512 Class

Definition

Namespace: System.Security.Cryptography
Assembly: System.Security.Cryptography.Algorithms.dll

Computes the SHA512 hash for the input data.

public abstract class SHA512 : System.Security.Cryptography.HashAlgorithm

Inheritance Object HashAlgorithm SHA512

Derived:
System.Security.Cryptography.SHA512Cng
System.Security.Cryptography.SHA512CryptoServiceProvider
System.Security.Cryptography.SHA512Managed

Examples

The following example computes the SHA512 hash for data and stores it in result. This example assumes that there is a predefined constant DATA_SIZE.

byte[] data = new byte[DATA_SIZE];
byte[] result;
SHA512 shaM = new SHA512Managed();
result = shaM.ComputeHash(data);

Remarks

The hash is used as a unique value of fixed size representing a large amount of data. Hashes of two sets of data should match if and only if the corresponding data also matches. Small changes to the data result in large unpredictable changes in the hash.

The hash size for the SHA512 algorithm is 512 bits.

This is an abstract class. The only implementation of this class is SHA512Managed.

SHA512 Class (System.Security.Cryptography) | Microsoft Docs



Back
Comments
Add Comment
There are no comments yet.