mirror of
https://github.com/Snawoot/windscribe-proxy.git
synced 2026-04-03 14:08:12 +00:00
16 lines
278 B
Go
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
|
|
}
|