Class StringHashExtensions
Extension methods to produce hashes from strings
Inheritance
System.Object
StringHashExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dangl
Assembly: Dangl.Common.dll
Syntax
public static class StringHashExtensions
Methods
| Improve this Doc View SourceToMd5(String)
Returns the MD5 hash of the string. Will return null for null input and string.Empty for empty strings. All-whitespace strings will be hashed normally.
Declaration
public static string ToMd5(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |
ToSha256(String)
Returns the SHA256 hash of the string. Will return null for null input and string.Empty for empty strings. All-whitespace strings will be hashed normally.
Declaration
public static string ToSha256(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |