🎨 添加图库和客服插件(有问题-待修改)

This commit is contained in:
2025-05-14 16:51:31 +08:00
parent 5faff4afa0
commit a5ae680f94
41 changed files with 2592 additions and 12 deletions

27
test/rain_test.go Normal file
View File

@@ -0,0 +1,27 @@
package test
import (
"fmt"
"golang.org/x/crypto/bcrypt"
"math/rand"
"testing"
"time"
)
func TestRain(t *testing.T) {
rand.New(rand.NewSource(time.Now().UnixNano()))
verifyCode := fmt.Sprintf("%06v", rand.Int31n(1000000))
fmt.Println(verifyCode)
}
func TestPwd(t *testing.T) {
password, _ := bcrypt.GenerateFromPassword([]byte("loser7659"), bcrypt.DefaultCost)
fmt.Println(string(password))
err := bcrypt.CompareHashAndPassword(password, []byte("122456"))
if err != nil {
fmt.Println("密码错误")
} else {
fmt.Println("密码正确")
}
}