diff --git a/metainfo/hash.go b/metainfo/hash.go index 1c0a0ff8..c755468c 100644 --- a/metainfo/hash.go +++ b/metainfo/hash.go @@ -36,6 +36,11 @@ func (h *Hash) FromHexString(s string) (err error) { return } +func NewHashFromHex(s string) (h Hash) { + h.FromHexString(s) + return +} + func HashBytes(b []byte) (ret Hash) { hasher := sha1.New() hasher.Write(b)