Class MessageDigest5
- Namespace
- Cuemon.Security.Cryptography
- Assembly
- Cuemon.Security.Cryptography.dll
Provides a MD5 implementation of the MD (Message Digest) cryptographic hashing algorithm for 128-bit hash values. This class cannot be inherited. Implements the UnkeyedCryptoHash<TAlgorithm>
public sealed class MessageDigest5 : UnkeyedCryptoHash<MD5>, IHash, IConfigurable<ConvertibleOptions>
- Inheritance
-
MessageDigest5
- Implements
- Inherited Members
Examples
The following example demonstrates how to compute an MD5 hash with
using System;
using System.Text;
using Cuemon.Security.Cryptography;
namespace MyApp.Examples;
public static class MessageDigest5Example
{
public static void Demonstrate()
{
var algorithm = new MessageDigest5();
var result = algorithm.ComputeHash(Encoding.UTF8.GetBytes("The quick brown fox jumps over the lazy dog"));
Console.WriteLine(MessageDigest5.BitSize);
Console.WriteLine(result.GetBytes().Length);
Console.WriteLine(result.ToHexadecimalString());
}
}
Constructors
MessageDigest5(Action<ConvertibleOptions>)
Initializes a new instance of the MessageDigest5 class.
public MessageDigest5(Action<ConvertibleOptions> setup = null)
Parameters
setupAction<ConvertibleOptions>The ConvertibleOptions which may be configured.
Fields
BitSize
Produces a 128-bit hash value
public const int BitSize = 128
Field Value
See Also
UnkeyedCryptoHash<TAlgorithm>
Hash<TOptions>