There is a Laravel project, but has now been refactored into a Go project.
How can a user's password saved using Laravel be verified with Go?
[UPDATE]
I use Hash::make($password)
store password in Laravel
I am using following codes solved the question
import "golang.org/x/crypto/bcrypt"
func Hash(str string) (string, error) {
hashed, err := bcrypt.GenerateFromPassword([]byte(str), bcrypt.DefaultCost)
return string(hashed), err
}
func IsSame(str string, hashed string) bool {
return bcrypt.CompareHashAndPassword([]byte(hashed), []byte(str)) == nil
}