Files
windscribe-proxy/wndclient/authhash.go
2021-06-23 21:11:19 +03:00

16 lines
278 B
Go

package wndclient
import (
"crypto/md5"
"encoding/hex"
"strconv"
"time"
)
func MakeAuthHash(secret string) (string, int64) {
iTime := time.Now().Unix()
sTime := strconv.FormatInt(iTime, 10)
h := md5.Sum([]byte(secret + sTime))
return hex.EncodeToString(h[:]), iTime
}