appveyor / secure-file

MIT License
26 stars 19 forks source link

Encountered a cryptographic error while encrypting the file #11

Open sfc-gh-hchaturvedi opened 3 years ago

sfc-gh-hchaturvedi commented 3 years ago

I used the documentation to encrypt a file using secure-file utility. These were the steps I took :

  1. iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
  2. .\appveyor-tools\secure-file -encrypt C:\Users\hchaturvedi\Desktop\secure-file\file.txt -secret -out C:\Users\hchaturvedi\Documents\DotNetWork\file.txt.enc
  3. I created two secure_variable by sticking both the secret and the salt from step 2 into the appveyor encryption utility .
  4. I placed both the encrypted values in appveyor.yml and pushed it to github.

That's when I get the following error - WARNING: You are using a hard-coded salt value! Please re-encrypt your data so a randomized salt can be generated (which you will also need to store). Encountered a cryptographic error while processing the file. Command exited with code 2

Can you please help pointing out what I might be doing wrong here?

FeodorFitsner commented 3 years ago

Could it be that is PR build? Secure variables are not decoded/set by default in PR builds.