Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeriveKey() function uses undeclared variable "Salt" #47

Open
maxweisspoker opened this issue Jul 24, 2024 · 0 comments
Open

DeriveKey() function uses undeclared variable "Salt" #47

maxweisspoker opened this issue Jul 24, 2024 · 0 comments

Comments

@maxweisspoker
Copy link

From the looks of it, the data variable passed into the first argument for EncryptBytes() and DecryptBytes() in encryption.go is in fact the passphrase, and the second argument "passphrase" is intended to be the Salt. That is confusing enough, but the DeriveKey() function is outright broken because it wants to use "Salt" which is not defined.

I have a PR which defines Salt in the "portwarden" namespace as the env var Salt, although I don't know if that's really how you want that function to work. Regardless, defining Salt as such clears away the errors and allows the program to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant