(t ObjectType, size int64)
| 46 | } |
| 47 | |
| 48 | func NewHasher(t ObjectType, size int64) Hasher { |
| 49 | h := Hasher{hash.New(hash.CryptoType)} |
| 50 | h.Write(t.Bytes()) |
| 51 | h.Write([]byte(" ")) |
| 52 | h.Write([]byte(strconv.FormatInt(size, 10))) |
| 53 | h.Write([]byte{0}) |
| 54 | return h |
| 55 | } |
| 56 | |
| 57 | func (h Hasher) Sum() (hash Hash) { |
| 58 | copy(hash[:], h.Hash.Sum(nil)) |
searching dependent graphs…