Python Encryption

Hi Everybody!

I would like to ask that; how can I encrypt my Python scripts in Blender ???
I would like to reach that nobody see, edit, copy theese scripts , but can use theese.

1 Like

Why? Blender is Open Source =
http://www.opensource.org/

and your work will be protected by any (combination) of about 50 liscensing options. If that isn’t good enough for you consider the fact that Blender itself is offered to you freely (source code) to use, modify and share. Why on earth would you want to use such liscense to close access to your own code (that works only within an OS App)?

%<

besides, even if such a feature existed in blender, anyone could find it’s module in the blender source code, and reverse engineer it/alter it so they could see/modify/copy your script anyway

Can’t you just distribute pre-compiled bytecode modules for a simple ‘wrapper’ script?
I don’t know if the pyc files differ from install to install/arch to arch etc.

the python cryptography toolkit may help. The module is called pyCrypto I believe, however I agree with the other posters here, you should open-source if at all possible.

I wrote a script to scramble a py file but ended up distributing a pyc instead, tried posting but its too long.

Can you share this script?

I have no idea of it.

Cython !

http://cython.org/

It allow you to write python module with are then compiled to a (.dll, or .so depending on the OS). Then you can use this compiled module as any other python module.

Of course the .dll or .so module produced is way harder to decompile than the python compiled (.pyc).

I agree with others. You don’t need to.