wust校园网认证登录(web + pppoe拨号)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package codecs
|
|
|
|
import (
|
|
"crypto/hmac"
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func HmacMd5(key, data string) string {
|
|
h := hmac.New(md5.New, []byte(key))
|
|
h.Write([]byte(data))
|
|
|
|
return hex.EncodeToString(h.Sum(nil))
|
|
}
|
|
|