mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 18:23:45 +08:00
feat: merge sms branch,add DuanXinBao sms service implemetation
This commit is contained in:
@@ -4,8 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/md5"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -82,3 +84,8 @@ func Sha256(data string) string {
|
||||
hashValue := hash.Sum(nil)
|
||||
return fmt.Sprintf("%x", hashValue)
|
||||
}
|
||||
|
||||
func Md5(data string) string {
|
||||
md5bs := md5.Sum([]byte(data))
|
||||
return hex.EncodeToString(md5bs[:])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user