Patent ID: 8528008

Claim:
A method for program protection based on a smart card, comprising: compiling, by a first device, first source code into a first assembly, and storing the first assembly to a smart card; extracting, by the first device, a namespace and a method of a remotely invoked class in the first source code to form a new class, writing in the new class a remote invocation instruction for remotely invoking the class in the first source code to generate second source code, compiling the second source code into a second assembly, and providing the smart card and the second assembly to a second device, wherein the new class is formed by an empty function; executing the second assembly, by the second device after obtaining the smart card and the second assembly, remotely invoking the class in the first source code, executing the class at the smart card via an interface of the smart card, and receiving an execution result returned by the smart card.