You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/common/serial/hash.go

14 lines
182 B

package serial
import (
"hash"
"v2ray.com/core/common/alloc"
)
func WriteHash(h hash.Hash) alloc.BytesWriter {
return func(b []byte) int {
h.Sum(b[:0])
return h.Size()
}
}