Automate Encrypting Source Files

I am also a little confused because it sounds like you already store your files unencrypted and you don’t need the password to build the project. When do you password protect the files? Do you share this project with others via a different channel than what you use for version control?

There’s a good discussion on source file encryption in an earlier Community thread. In short, the source file protection feature in Automation Studio is more of an access control check/deterrent than true encryption. The fact that you’re able to build the project without needing to input the password proves that Automation Studio knows it without your input. I’m not sure how this is done, and I don’t expect anyone from B&R would post that publicly.

My recommendation would be to put the code you want to protect inside of libraries and then import those libraries into the project as compiled binaries. This does a better job of protecting the code wherever it ends up. You can then keep the libraries’ source code in a separate version control repository that you control more tightly than the rest of the project.