ComputeHash compute the hash for a given ObjectType and content
(t ObjectType, content []byte)
| 17 | |
| 18 | // ComputeHash compute the hash for a given ObjectType and content |
| 19 | func ComputeHash(t ObjectType, content []byte) Hash { |
| 20 | h := NewHasher(t, int64(len(content))) |
| 21 | h.Write(content) |
| 22 | return h.Sum() |
| 23 | } |
| 24 | |
| 25 | // NewHash return a new Hash from a hexadecimal hash representation |
| 26 | func NewHash(s string) Hash { |
searching dependent graphs…