Frequent tipster Leonid Nemirovsky shares his method for protecting LISP code. It consists of three functions separate from the main program. The first function is a counter that keeps track of how many times the program has been run, and the second provides a "key" that allows the function to run regardless of the count. The third is a wrapper function that checks the counter and/or the presence of a key, and either allows the program to run or prevents it from running.
In this particular version the counter is local to the drawing, but it could be altered to store the counter in a file or the registry. It also requires that you compile your code so that the security method is not exposed. You can compile LISP code to an FAS or VLX file using functions built into the VLISP editor; there are also third-party compilers available. Although nothing is perfectly secure, this method should work just fine in many situations. Thanks for sharing, Leonid. |