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