12345678910111213141516171819202122232425 |
- package util
- import (
- "app.yhyue.com/moapp/jybase/common"
- "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
- "crypto/md5"
- "encoding/hex"
- )
- // sha1 加密
- func GetHashKey(bs []byte) string {
- defer common.Catch()
- //ha := sha256.New()
- //ha.Write(bs)
- //hbs := ha.Sum(nil)
- //key := fmt.Sprintf("%x", hbs)
- //return key
- hash := md5.Sum(bs)
- return hex.EncodeToString(hash[:])
- }
- // 创建订单号
- func GetOrderCode() string {
- return <-jy.VarOrderCode.Pool
- }
|