data/misc.go
func HashPassword(password, salt string) (Base64String, error) {
	salted := []byte(password + salt)
	passwordHash, err := bcrypt.GenerateFromPassword(salted, bcrypt.DefaultCost)
	if err != nil {
		return "", err
	}
	return FromBytes(passwordHash), nil
}
func HashPassword(password, salt string) (Base64String, error) {
	salted := []byte(password + salt)
	passwordHash, err := bcrypt.GenerateFromPassword(salted, bcrypt.DefaultCost)
	if err != nil {
		return "", err
	}
	return FromBytes(passwordHash), nil
}
func HashPassword ( password , salt string ) ( Base64String , error ) { salted := [ ] byte ( password + salt ) passwordHash , err := bcrypt . GenerateFromPassword ( salted , bcrypt . DefaultCost ) if err != nil { return " " , err } return FromBytes ( passwordHash ) , nil }
// HashPassword computes encoded hash of the password.
HashPassword computes encoded hash of the password .