2
0
mirror of synced 2025-02-23 22:28:11 +00:00

Add metainfo.NewHashFromHex

This commit is contained in:
Matt Joiner 2016-06-21 02:35:53 +10:00
parent ce0a3d56f1
commit 364f617ade

View File

@ -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)