1. A method performed by a computer in communication with a hardware security module (HSM), the method comprising: running a process virtual machine (PVM) on the computer, the PVM being configured to execute portable bytecode instructions within a PVM environment; and executing, within the PVM environment, instructions for: reading encrypted instruction code from data storage of the computer; sending the encrypted instruction code to the HSM; in response, receiving decrypted instruction code from the HSM; and injecting the decrypted instruction code within an application running in the PVM environment for execution by the PVM; wherein: the instructions for reading, sending, receiving, and injecting are Java bytecode instructions included within a loader class module of the application, the application also including additional class modules having instructions to perform core functions of the application; the decrypted instruction code is script code written in an interpretable scripting language; injecting includes: parsing the decrypted instruction code as script code using a script class loader to generate a script-based class; and instantiating the generated script-based class as an object; and execution of the decrypted instruction code includes calling a method of the instantiated object.