Class DigestString
Static methods for computing message digests for strings, using the most common algorithms.
Inheritance
Namespace: WizardWrx.Cryptography
Assembly: WizardWrx.Core.dll
Syntax
public static class DigestString : object
Methods
| Improve this Doc View SourceSHA256Hash(Byte[])
Given a byte array, return its SHA-256 message digest as a 64 character string of hexadecimal digits.
Declaration
public static string SHA256Hash(byte[] pabytPlainText)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | pabytPlainText | Supply a pointer to the byte array to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 64 hexadecimal characters. |
SHA256Hash(String)
Given a string, return its SHA-256 message digest as a 64 character string of hexadecimal digits.
Declaration
public static string SHA256Hash(string strPlaintext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strPlaintext | Supply a pointer to the string to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 64 hexadecimal characters. |
SHA384Hash(Byte[])
Given a byte array, return its SHA-384 message digest as a 96 character string of hexadecimal digits.
Declaration
public static string SHA384Hash(byte[] pabytPlainText)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | pabytPlainText | Supply a pointer to the byte array to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 96 hexadecimal characters. |
SHA384Hash(String)
Given a string, return its SHA-384 message digest as a 96 character string of hexadecimal digits.
Declaration
public static string SHA384Hash(string strPlaintext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strPlaintext | Supply a pointer to the string to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 96 hexadecimal characters. |
SHA512Hash(Byte[])
Given a byte array, return its SHA-512 message digest as a 128 character string of hexadecimal digits.
Declaration
public static string SHA512Hash(byte[] pabytPlainText)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | pabytPlainText | Supply a pointer to the byte array to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 128 hexadecimal characters. |
SHA512Hash(String)
Given a string, return its SHA-512 message digest as a 128 character string of hexadecimal digits.
Declaration
public static string SHA512Hash(string strPlaintext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strPlaintext | Supply a pointer to the string to be digested. |
Returns
| Type | Description |
|---|---|
| System.String | The return value is a message digest, consisting of a string of 128 hexadecimal characters. |