16 lines
223 B
Go
16 lines
223 B
Go
package main
|
|
|
|
import (
|
|
"crypto/hmac"
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func GenerateVerifyKey(key string) string {
|
|
mac := hmac.New(md5.New, []byte(key))
|
|
|
|
mac.Write([]byte(key))
|
|
|
|
return hex.EncodeToString(mac.Sum(nil))
|
|
}
|