berserker.go 276 B

1234567891011121314
  1. package dao
  2. import (
  3. "crypto/md5"
  4. "encoding/hex"
  5. "fmt"
  6. )
  7. func (d *Dao) berserkerSign(ak, sk, dt, ver string) string {
  8. str := fmt.Sprintf("%sappKey%stimestamp%sversion%s%s", sk, ak, dt, ver, sk)
  9. b := md5.Sum([]byte(str))
  10. sign := hex.EncodeToString(b[:])
  11. return sign
  12. }