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

16 lines
190 B
Go
Raw Normal View History

2016-01-12 10:52:40 +00:00
package protocol
2016-01-12 10:38:43 +00:00
import (
"crypto/hmac"
"crypto/md5"
"hash"
)
func TimestampHash() hash.Hash {
return md5.New()
}
func IDHash(key []byte) hash.Hash {
return hmac.New(md5.New, key)
}