Lee-WineList/test/pwd_test.go

15 lines
242 B
Go
Raw Normal View History

2023-04-24 17:19:41 +08:00
package test
import (
"fmt"
"golang.org/x/crypto/bcrypt"
"testing"
)
func TestPwd(t *testing.T) {
bytePass := []byte("123123")
hPass, _ := bcrypt.GenerateFromPassword(bytePass, bcrypt.DefaultCost)
s := string(hPass)
fmt.Println(s)
}