Protecting Proteus programs

In many cases, it can be useful to protect Proteus scripts when they are released, e.g. to avoid that other people tamper with them, or because you want to protect the intellectual property or the algorithms used, or to avoid that other people copy and/or resell them as if they had written them.

For this reason, Proteus incorporates an encryption system based on random keys; the program PCOMPILE.PRE is available to compile and protect your scripts.

The working principle is very simple. When you are done debugging your program and are ready to release it to the world, compile it by using:

proteus pcompile.pre program.prt

Two files will be produced: program.pre and program.prk.

The extension ".PRE" stands for PRoteus Encrypted; this file actually holds the original program (and all the files referenced in the !include directives), encrypted by using the file ".PRK". This file is randomly generated at compile time and must always be distributed together with its file ".PRE" to let it work. If program.prt is recompiled later and the file ".PRK" is still available, the same keys are used again to recompile the program.

The file program.prk includes a digital signature that easily allows to determine if the program was compiled with a specific hardware key; when running the interpreter with parameter -$:

proteus -$ program.prk

one of the following messages will appear:

Message Meaning
authenticity verified - license #licence number the key file was created with the connected hardware key
authenticity verification failed the key file was created with a different hardware key
authenticity verification impossible the interpreter being used is a demo version (no hardware key); the verification is impossible

Protected programs are run in the same way as unprotected programs; the only difference is that you need to specify the full program name (including extension, which must always be ".PRE"); as already mentioned, the corresponding file ".PRK" must always accompany the protected program.

Note:  when runinng protected programs it is not necessary to have connected the same hardware dongle that was used when compiling them; they can be run by the demo version and by another registered version.

To limit script execution to the computers equipped with specific hardware keys, you can use the function W32PROTLICENSE as illustrated in the code fragment below:

; Check the value returned by W32PROTLICENSE
; to determine if the computer can run the application
SWITCH W32PROTLICENSE()
ON "20040101001", "20040101002", "20040101003"
  ; All these keys are enabled
OTHER
  CONSOLELN "Unauthorized key!"
  ABORT 0
OFF
; Key verified: go on

Once the program is protected, it can be run only by computers equipped with the specified hardware keys.

Start of page Next topic Previous topic Contents Index
Midnight Lake iPhone Case Black Women Shoes Black Flat Shoes Leather Flats Black Patent Ballerinas Black Ballet Shoes Casual Shoes Black Shoes Women Balle Record Player Cufflinks Best iPhone XR Clear Cases iPhone XS/XS Max Leather Cases Sale Best iPhone 8/8 Plus Silicone Cases iPhone 7/7 Plus Cases & Screen Protector New Cases For iPhone 6/6 Plus iPhone 8 Case Sale iPhone Xr Case Online iPhone 7 Case UK Online iPhone X Case UK Sale iPhone X Case Deals iPhone Xs Case New Case For iPhone Xr UK Online Case For iPhone 8 UK Outlet Fashion Silver Cufflinks For Men Best Mens Cufflinks Outlet Online The Gold Cufflinks Shop Online Cheap Shirt Cufflinks On Sale Nice Wedding Cufflinks UK Online Top Black Cufflinks UK Online Mens Cufflinks Online Silver Cufflinks For Men Men Cufflinks UK Sale Gold Cufflinks UK Online Gold Cufflinks UK Silver Cufflinks UK Shirt Cufflinks Discount Online Mens Cufflinks Deals & Sales Girls Shoes For Dance Fashion Ballet Dance Shoes Best Ballet Flats Shoes UK Online Cheap Ballet Pointe Shoes UK Online Best Ballet Shoes Outlet Best Dance Shoes Sale Cheap Ballet Flats Sale UK Best Pointe Shoes Online UK Ballet Dance Shoes UK Shoes For Dance UK Best Ballet Slippers Shop Best Yoga Shoes Hotsell