15 lines
242 B
Go
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)
|
|
}
|