aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/types.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/types.go b/common/types.go
index 1bda164..f51a519 100644
--- a/common/types.go
+++ b/common/types.go
@@ -53,6 +53,11 @@ func (h Hash) String() string {
return hex.EncodeToString([]byte(h[:]))
}
+// Bytes return the hash as slice of bytes.
+func (h Hash) Bytes() []byte {
+ return h[:]
+}
+
// Equal compares if two hashes are the same.
func (h Hash) Equal(hp Hash) bool {
return h == hp