mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-10-17 16:33:40 -04:00
16 lines
186 B
Go
16 lines
186 B
Go
|
package user
|
||
|
|
||
|
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)
|
||
|
}
|