Table of Contents

Class SecureHashAlgorithm512

Namespace
Cuemon.Security.Cryptography
Assembly
Cuemon.Security.Cryptography.dll

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

SecureHashAlgorithm512(Action<ConvertibleOptions>)

Initializes a new instance of the SecureHashAlgorithm512 class.

public SecureHashAlgorithm512(Action<ConvertibleOptions> setup = null)

Parameters

setup Action<ConvertibleOptions>

The ConvertibleOptions which may be configured.

Fields

BitSize

Produces a 512-bit hash value

public const int BitSize = 512

Field Value

int

See Also

UnkeyedCryptoHash<TAlgorithm>
Hash<TOptions>