This commit is contained in:
parent
173964a6fc
commit
21ef2f1372
5 changed files with 20 additions and 6 deletions
|
@ -15,5 +15,8 @@ func main() {
|
|||
sharedSecret = os.Args[1]
|
||||
}
|
||||
|
||||
fmt.Println(base64.StdEncoding.EncodeToString(hmac.New(sha512.New, []byte(sharedSecret)).Sum([]byte(fmt.Sprintf("%d", time.Now().Unix()/10)))))
|
||||
h := hmac.New(sha512.New, []byte(sharedSecret))
|
||||
h.Write([]byte(fmt.Sprintf("%d", time.Now().Unix()/10)))
|
||||
|
||||
fmt.Println(base64.StdEncoding.EncodeToString(h.Sum(nil)))
|
||||
}
|
||||
|
|
Reference in a new issue