v2ray-core/proxy/vmess/protocol/inthash.go

16 lines
253 B
Go
Raw Normal View History

package protocol
2015-09-16 19:13:13 +00:00
import (
"crypto/md5"
)
func Int64Hash(value int64) []byte {
md5hash := md5.New()
buffer := int64ToBytes(value)
md5hash.Write(buffer)
md5hash.Write(buffer)
md5hash.Write(buffer)
md5hash.Write(buffer)
return md5hash.Sum(nil)
}