Patent ID: 7818815

Claim:
A non-transitory computer readable storage medium with computer program code embodied thereon, the computer program code executable on a processor of a communication device, the computer program code comprising: an instruction to identify specified data stored on the communication device to be used by a program stored in a memory of the communication device during execution of the program on the communication device, and wherein the communication device is configured to store the specified data among data stored in a first portion of the memory of the communication device, wherein the data stored in the first portion of the memory is accessible by trusted programs; an instruction to determine, in response to a request to execute the program, whether the program is a trusted program of the trusted programs; an instruction to generate, based upon determination that the program is an untrusted program, a perfect encapsulated object in a second portion of the memory allocated for use by the program, wherein the perfect encapsulated object is configured to encapsulate the specified data and prohibit the program from accessing said encapsulated specified data during execution of the program, and wherein the perfect encapsulated object specifies at least one external method to allow the program to instruct the encapsulated object to perform an operation with the encapsulated specified data on the communication device, without permitting the program to access the encapsulated specified data; an instruction to restrict access by the program, in further response to determination that the program is the untrusted program, to resources of the communication device and prohibit access, by the program, to the specified data stored in the first portion of the memory; and an instruction, in response to an operation of the program to use the at least one external method specified by the perfect encapsulated object, to instruct the perfect encapsulated object to perform the operation with the encapsulated specified data on the communication device without permitting the program to access the encapsulated specified data.