Lee-WineList/test/pwd_test.go
2023-04-24 17:19:41 +08:00

15 lines
242 B
Go

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)
}