code: func (state *UserState) HashPassword(username, password string) string {
  	switch state.passwordAlgorithm {
  	case "sha256":
  		return string(hash_sha256(state.cookieSecret, username, password))
  	case "bcrypt", "bcrypt+":
  		return string(hash_bcrypt(password))
  	}
  	// Only valid password algorithms should be allowed to set
  	return ""
  }
docs: // Hash the password (takes a username as well, it can be used for salting).