]> Cypherpunks.ru repositories - goredo.git/blobdiff - hash.go
Move Hash-related code to separate file
[goredo.git] / hash.go
diff --git a/hash.go b/hash.go
new file mode 100644 (file)
index 0000000..420937d
--- /dev/null
+++ b/hash.go
@@ -0,0 +1,13 @@
+package main
+
+import (
+       "encoding/hex"
+)
+
+const HashLen = 32
+
+type Hash string
+
+func (h Hash) String() string {
+       return hex.EncodeToString([]byte(h))
+}