code: func GenerateFromPassword(salt []byte, password []byte, cost int) ([]byte, error) {
  	if len(salt) != maxSaltSize {
  		return nil, fmt.Errorf("Salt len must be %v", maxSaltSize)
  	}
  	p, err := newFromPassword(salt, password, cost)
  	if err != nil {
  		return nil, err
  	}
  	return p.Hash(), nil
  }
docs: // GenerateFromPassword returns the bcrypt hash of the password at the given
  // cost. If the cost given is less than MinCost, the cost will be set to
  // DefaultCost, instead. Use CompareHashAndPassword, as defined in this package,
  // to compare the returned hashed password with its cleartext version.