C# Class System.Utilities.Cryptography.Hash

Provides hash computation services using the SHA-2 family of algorithms. It supports 256-bit, 384-bit, and 512-bit hashes. This implementation is FIPS compliant. The functions are named in the following fashion: The first section indicates the operation being performed. The second section indicates the bit length of the hash. The third section notes the formatted return value of the hash.
显示文件 Open project: ellipticbit/systemutilities

Public Methods

Method Description
Compute256Base64 ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute256Base64 ( System Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.

Compute256Base64 ( byte Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.

Compute256Base64 ( string Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.

Compute256Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute256Byte ( System Data ) : byte[]

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.

Compute256Byte ( byte Data ) : byte[]

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.

Compute256Byte ( string Data ) : byte[]

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.

Compute256Hex ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute256Hex ( System Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute256Hex ( byte Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute256Hex ( string Data ) : string

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute384Base64 ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute384Base64 ( System Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.

Compute384Base64 ( byte Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.

Compute384Base64 ( string Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.

Compute384Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute384Byte ( System Data ) : byte[]

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.

Compute384Byte ( byte Data ) : byte[]

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.

Compute384Byte ( string Data ) : byte[]

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.

Compute384Hex ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute384Hex ( System Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute384Hex ( byte Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute384Hex ( string Data ) : string

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute512Base64 ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute512Base64 ( System Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.

Compute512Base64 ( byte Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.

Compute512Base64 ( string Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.

Compute512Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute512Byte ( System Data ) : byte[]

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.

Compute512Byte ( byte Data ) : byte[]

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.

Compute512Byte ( string Data ) : byte[]

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.

Compute512Hex ( IEnumerable Data, IEnumerable Salt ) : string

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)

Compute512Hex ( System Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute512Hex ( byte Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.

Compute512Hex ( string Data ) : string

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.

Private Methods

Method Description
Hash ( ) : System

Method Details

Compute256Base64() public static method

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute256Base64 ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute256Base64() public static method

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute256Base64 ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute256Base64() public static method

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute256Base64 ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute256Base64() public static method

Generates a 256-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute256Base64 ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string

Compute256Byte() public static method

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute256Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return byte[]

Compute256Byte() public static method

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute256Byte ( System Data ) : byte[]
Data System The data to be hashed.
return byte[]

Compute256Byte() public static method

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute256Byte ( byte Data ) : byte[]
Data byte The data to be hashed. Takes an array of bytes.
return byte[]

Compute256Byte() public static method

Generates a 256-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute256Byte ( string Data ) : byte[]
Data string The data to be hashed. Takes a string.
return byte[]

Compute256Hex() public static method

Generates a 256-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute256Hex ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute256Hex() public static method

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute256Hex ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute256Hex() public static method

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute256Hex ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute256Hex() public static method

Generates a 256-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute256Hex ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string

Compute384Base64() public static method

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute384Base64 ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute384Base64() public static method

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute384Base64 ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute384Base64() public static method

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute384Base64 ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute384Base64() public static method

Generates a 384-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute384Base64 ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string

Compute384Byte() public static method

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute384Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return byte[]

Compute384Byte() public static method

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute384Byte ( System Data ) : byte[]
Data System The data to be hashed.
return byte[]

Compute384Byte() public static method

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute384Byte ( byte Data ) : byte[]
Data byte The data to be hashed. Takes an array of bytes.
return byte[]

Compute384Byte() public static method

Generates a 384-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute384Byte ( string Data ) : byte[]
Data string The data to be hashed. Takes a string.
return byte[]

Compute384Hex() public static method

Generates a 384-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute384Hex ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute384Hex() public static method

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute384Hex ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute384Hex() public static method

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute384Hex ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute384Hex() public static method

Generates a 384-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute384Hex ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string

Compute512Base64() public static method

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as an Base-64 string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute512Base64 ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute512Base64() public static method

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute512Base64 ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute512Base64() public static method

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute512Base64 ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute512Base64() public static method

Generates a 512-bit hash for the given data and returns the generated results as a Base-64 string.
public static Compute512Base64 ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string

Compute512Byte() public static method

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as an array of bytes. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute512Byte ( IEnumerable Data, IEnumerable Salt ) : byte[]
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return byte[]

Compute512Byte() public static method

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute512Byte ( System Data ) : byte[]
Data System The data to be hashed.
return byte[]

Compute512Byte() public static method

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute512Byte ( byte Data ) : byte[]
Data byte The data to be hashed. Takes an array of bytes.
return byte[]

Compute512Byte() public static method

Generates a 512-bit hash for the given data and returns the generated results as an array of bytes.
public static Compute512Byte ( string Data ) : byte[]
Data string The data to be hashed. Takes a string.
return byte[]

Compute512Hex() public static method

Generates a 512-bit hash for the given data using the specified Salt value and returns the generated results as a hexadecimal string. If no salt value is given one is automatically used. (NOTE: The default salt value is static and should not be considered secure!)
public static Compute512Hex ( IEnumerable Data, IEnumerable Salt ) : string
Data IEnumerable The data to be hashed. Takes an array of bytes.
Salt IEnumerable The salt value used to help prevent dictionary attacks. Takes an array of bytes.
return string

Compute512Hex() public static method

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute512Hex ( System Data ) : string
Data System The data to be hashed. Takes an IO Stream.
return string

Compute512Hex() public static method

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute512Hex ( byte Data ) : string
Data byte The data to be hashed. Takes an array of bytes.
return string

Compute512Hex() public static method

Generates a 512-bit hash for the given data and returns the generated results as a hexadecimal string.
public static Compute512Hex ( string Data ) : string
Data string The data to be hashed. Takes a string.
return string