Hiding parts of my program

Hi all,

in Automation Studio, is it possible to hide parts of a program?

I would like to share my application but hiding parts of my code so only me has access to those parts, is there any way to do it?

How about creating libraries that anyone is able to use but whose content is locked and no readable?

Thanks!

Hello Jose A. Lpez

Welcome to B&R community

you can encript the part of the code you want, so in order to access to it, a password is needed. To do so:
Right click on the .st file
imagen
On the properties click on the detail tab

And then on encrypted add password

3 Likes

Hello,

hiding is not possible but you can password protect tasks or libraries.
This means anyone can use them but only the person with the password can change them

2 Likes

Lke @oliver.doberer mentioned, the modification of the encrypted file is only allowed with password
imagen
Only to add that the access to the file to read it, is also restricted with password, hence the third party will only know that library/program is there, but they won’t be able to neither read or modify it.

Regards

1 Like

Another option is exporting your custom libraries in Binary form rather than Source Code form, which is documented in the Automation Studio Help. When someone imports your library into their project, they will not see the source code and there is no way to get the source code from the binary version of the library. Just make sure you document and maintain the library well so that you can make updates as needed in the future.

2 Likes

@wenbo.ruan why to include an encrypted file via password, where there is a way to block forever and ever the access to the source code including the binary files as @marcusbnr is pointing.

Live caption of Jose . LĂłpez @c584138 blocking the entrance to the source code:
image

4 Likes

If I remember correctly (tried it a couple years ago), then is it not required to enter a password when you build the project.
How can AS access the source to compile it if it is encrypted but no password is given to it?

1 Like

I’ve no idea how it’s solved by AS.

But in general I think it’s possible if a symmetric encryption algorithm is used.
Then it would be possible for a program knowing the algorithm and the key to decrypt the password (of course it has to be stored somewhere in its encrypted version) and using it to decrypt the data, both “on the fly” (without storing / changing data).

@Michael.Uray as far as I know AS still knows the source code but it is encrypted for the user

This is what I actually mean and what my concerns are with this encryption.
If AS is able to decrypt it without a password provided by the user before the compile process, then the decryption key is stored somewhere in the AS project and I would not consider this as safe solution to protect your code.

2 Likes

Yes you are right this is not a secure way, I know how to found the password of an encrypted file.
But I will not explain this.

1 Like

I think it is better to export is as machine code as library if you want to “lock” part of the code. I’m agreed that the password lock in Automation Studio is not very secure and it seem like I’m not the only one discovered this too. :slightly_smiling_face:

BTW, even it is in machine code. I guess you still can disassembled it.

1 Like

You can also make your librabies and compile them as binary. So the project you share with people would have a binary compiled version of your library and your private project could have the non binary version.

I can recommend using version control like git for this and having branches for private and public versions.

2 Likes