// generateMasterPassword : generates the master password to decrypt the vault database
generateMasterPassword : generates the master password to decrypt the vault database
// generateMasterPassword : generates the master password to decrypt the vault database
func (v *Vault) generateMasterPassword(password []byte, keyfilePath string) ([]byte, error) {
	if keyfilePath == "" {
		v.Logger.Debug("not using keyfile")
		if password == nil {
			return nil, errors.New("empty master password provided")
		}
		return password, nil
	}
	v.Logger.Debug("using keyfile")
	keyfileBytes, err := loadKeyFilePassword(keyfilePath)
	if err != nil {
		return nil, err
	}
	return append(password, keyfileBytes...), nil
}
func ( v * Vault ) generateMasterPassword ( password [ ] byte , keyfilePath string ) ( [ ] byte , error ) { if keyfilePath == " " { v . Logger . Debug ( " " ) if password == nil { return nil , errors . New ( " " ) } return password , nil } v . Logger . Debug ( " " ) keyfileBytes , err := loadKeyFilePassword ( keyfilePath ) if err != nil { return nil , err } return append ( password , keyfileBytes ... ) , nil }
generateMasterPassword : generates the master password to decrypt the vault database
generateMasterPassword : generates the master password to decrypt the vault database