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.
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.