C# Class BitSharper.Sha256Hash

Show file Open project: TangibleCryptography/BitSharper Class Usage Examples

Public Properties

Property Type Description
ZeroHash Sha256Hash

Public Methods

Method Description
Duplicate ( ) : Sha256Hash
Equals ( object other ) : bool

Returns true if the hashes are equal.

GetHashCode ( ) : int

Hash code of the byte array as calculated by object.GetHashCode. Note the difference between a SHA256 secure bytes and the type of quick/dirty bytes used by the Java hashCode method which is designed for use in bytes tables.

Sha256Hash ( byte bytes ) : System

Creates a Sha256Hash by wrapping the given byte array. It must be 32 bytes long.

Sha256Hash ( string @string ) : System

Creates a Sha256Hash by decoding the given hex string. It must be 64 characters long.

ToBigInteger ( ) : BigInteger

Returns the bytes interpreted as a positive integer.

ToString ( ) : string

Method Details

Duplicate() public method

public Duplicate ( ) : Sha256Hash
return Sha256Hash

Equals() public method

Returns true if the hashes are equal.
public Equals ( object other ) : bool
other object
return bool

GetHashCode() public method

Hash code of the byte array as calculated by object.GetHashCode. Note the difference between a SHA256 secure bytes and the type of quick/dirty bytes used by the Java hashCode method which is designed for use in bytes tables.
public GetHashCode ( ) : int
return int

Sha256Hash() public method

Creates a Sha256Hash by wrapping the given byte array. It must be 32 bytes long.
public Sha256Hash ( byte bytes ) : System
bytes byte
return System

Sha256Hash() public method

Creates a Sha256Hash by decoding the given hex string. It must be 64 characters long.
public Sha256Hash ( string @string ) : System
@string string
return System

ToBigInteger() public method

Returns the bytes interpreted as a positive integer.
public ToBigInteger ( ) : BigInteger
return Org.BouncyCastle.Math.BigInteger

ToString() public method

public ToString ( ) : string
return string

Property Details

ZeroHash public static property

public static Sha256Hash,BitSharper ZeroHash
return Sha256Hash