Skip to main content

HashExtensions

Assembly: ServiceStack.dll​
View Source​
Declaration
public static class HashExtensions

Methods​

HexHash(HashAlgorithm, String)​

View Source​
Declaration
public static string HexHash(HashAlgorithm hash, string s)
Returns​

System.String

Parameters​
TypeName
System.Security.Cryptography.HashAlgorithmhash
System.Strings

HexHash(HashAlgorithm, Byte[])​

View Source​
Declaration
public static string HexHash(HashAlgorithm hash, byte[] bytes)
Returns​

System.String

Parameters​
TypeName
System.Security.Cryptography.HashAlgorithmhash
System.Byte[]bytes

ToSha1Hash(String)​

View Source​
Declaration
public static string ToSha1Hash(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

ToSha1HashBytes(Byte[])​

View Source​
Declaration
public static byte[] ToSha1HashBytes(this byte[] bytes)
Returns​

System.Byte[]

Parameters​
TypeName
System.Byte[]bytes

ToSha256Hash(String)​

View Source​
Declaration
public static string ToSha256Hash(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

ToMd5Hash(String)​

View Source​
Declaration
public static string ToMd5Hash(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

ToSha256HashBytes(Byte[])​

View Source​
Declaration
public static byte[] ToSha256HashBytes(this byte[] bytes)
Returns​

System.Byte[]

Parameters​
TypeName
System.Byte[]bytes

ToSha512Hash(String)​

View Source​
Declaration
public static string ToSha512Hash(this string value)
Returns​

System.String

Parameters​
TypeName
System.Stringvalue

ToSha512HashBytes(Byte[])​

View Source​
Declaration
public static byte[] ToSha512HashBytes(this byte[] bytes)
Returns​

System.Byte[]

Parameters​
TypeName
System.Byte[]bytes