1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-14 08:15:55 -05:00
v2fly/proxy/vmess/protocol/user/inthash.go

16 lines
249 B
Go
Raw Normal View History

2015-09-19 18:11:14 -04:00
package user
2015-09-16 15:13:13 -04: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)
}