Feat: HMAC auth and check

This commit is contained in:
HFO4
2019-12-10 11:13:33 +08:00
parent 4649ddbae2
commit e871f6e421
7 changed files with 166 additions and 5 deletions

View File

@@ -4,8 +4,13 @@ import (
"math/rand"
"regexp"
"strings"
"time"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
// RandStringRunes 返回随机字符串
func RandStringRunes(n int) string {
var letterRunes = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")