Abstract: A method of automatically transforming a computer program in order to control it's execution in compliance with the end user license agreement and concealing the program logic. The method allows even for distributing program's source code and still enforcing the license. In particular the execution control allows for managing the period of time and the number of times a particular instance of a program was run as well as for detecting the fact of a simultaneous execution of the same instance by several users. Allows for a very infrequent outside interaction with a secure program such that only a certain percentage of program executions causes outside connection, and no more than a fixed number of times per each such execution independently of the input data size. For each outside interaction allows for an extremely simple and independent of the client input data size secure program processing.