com.google.bitcoin.core
Class Sha256Hash
java.lang.Object
com.google.bitcoin.core.Sha256Hash
- All Implemented Interfaces:
- Serializable
public class Sha256Hash
- extends Object
- implements Serializable
A Sha256Hash just wraps a byte[] so that equals and hashcode work correctly, allowing it to be used as keys in a
map. It also checks that the length is correct and provides a bit more type safety.
- See Also:
- Serialized Form
Field Summary |
byte[] |
hash
|
hash
public byte[] hash
Sha256Hash
public Sha256Hash(byte[] hash)
equals
public boolean equals(Object other)
- Returns true if the hashes are equal.
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Hash code of the byte array as calculated by
Object.hashCode()
. Note the difference between a SHA256
secure hash and the type of quick/dirty hash used by the Java hashCode method which is designed for use in
hash tables.
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011. All Rights Reserved.