Class SecureHashAlgorithm512256
- Namespace
- Cuemon.Security.Cryptography
- Assembly
- Cuemon.Security.Cryptography.dll
Provides a SHA-512-256 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 SecureHashAlgorithm512256 : UnkeyedCryptoHash<SHA512256>, IHash, IConfigurable<ConvertibleOptions>
- Inheritance
-
SecureHashAlgorithm512256
- Implements
- Inherited Members
Examples
The following example demonstrates how to compute a SHA-512/256 hash with
using System;
using System.Text;
using Cuemon.Security.Cryptography;
namespace MyApp.Examples;
public static class SecureHashAlgorithm512256Example
{
public static void Demonstrate()
{
var algorithm = new SecureHashAlgorithm512256(null);
var result = algorithm.ComputeHash(Encoding.UTF8.GetBytes("Payload for SHA-512/256"));
Console.WriteLine(SecureHashAlgorithm512256.BitSize);
Console.WriteLine(result.GetBytes().Length);
}
}
Constructors
SecureHashAlgorithm512256(Action<ConvertibleOptions>)
Initializes a new instance of the SecureHashAlgorithm512256 class.
public SecureHashAlgorithm512256(Action<ConvertibleOptions> setup)
Parameters
setupAction<ConvertibleOptions>The ConvertibleOptions which may be configured.
Fields
BitSize
Produces a 256-bit hash value
public const int BitSize = 256
Field Value
See Also
UnkeyedCryptoHash<TAlgorithm>
Hash<TOptions>