1. A method executed by a computer for ensuring trust between code modules, the method comprising: receiving code identifying a hierarchy of Trusted Entities (“TEs”), the hierarchy consisting of a root TE and at least one subordinate TE, each subordinate TE having one or more associated Trusted Code Groups (“TCGs”), each TCG having a unique 32-bit TCG ID; receiving an application that uses a class of functionality, the application including a first list of TGCs trusted by the application to implement the class; receiving a library that implements the class of functionality, the library being signed using a signing key, the signature including a list of TCG IDs identifying a second list of TCGs, each TCG in the second list of TCGs being a module that the library has been approved to access; executing code in the application which requests creation of an instance of a class implemented in the library; loading the library into application memory; and prior to loading the library, causing the signature on the library to be verified to determine if the TGC IDs in the signature of the library are listed in the first list of TGCs, wherein each TGC ID is allocated a bit range uniquely identifying the subordinate TE to which it belongs.