Table of Contents

SecureHashAlgorithm512 Class

Definition

Namespace
Cuemon.Security.Cryptography
Assemblies
Cuemon.Security.Cryptography.dll
Source
src/Cuemon.Security.Cryptography/SecureHashAlgorithm512.cs

Provides a SHA-512 implementation of the SHA (Secure Hash Algorithm) cryptographic hashing algorithm for 512-bit hash values. This class cannot be inherited. Implements the UnkeyedCryptoHash<TAlgorithm>

public sealed class SecureHashAlgorithm512 : UnkeyedCryptoHash<SHA512>, IHash, IConfigurable<ConvertibleOptions>
Inheritance
SecureHashAlgorithm512
Implements
Inherited Members

Examples

The following example demonstrates how to compute a SHA-512 hash with .

using System;
using System.Text;
using Cuemon.Security.Cryptography;

namespace MyApp.Examples;

public static class SecureHashAlgorithm512Example
{
    public static void Demonstrate()
    {
        var algorithm = new SecureHashAlgorithm512();
        var result = algorithm.ComputeHash(Encoding.UTF8.GetBytes("Payload for SHA-512"));

        Console.WriteLine(SecureHashAlgorithm512.BitSize);
        Console.WriteLine(result.ToBase64String());
    }
}

Constructors

Name Description
SecureHashAlgorithm512(Action<ConvertibleOptions>)

Initializes a new instance of the SecureHashAlgorithm512 class.

Fields

Name Description
BitSize

Produces a 512-bit hash value

See Also

UnkeyedCryptoHash<TAlgorithm>
Hash<TOptions>