The Profile object also provides a mechanism to specify the fields of the data documents and how they should be encrypted. Here are the relevant lines from the Profile.java module:
/** Configure properties of data documents
* This table defines the fields in the documents exchanged
* in the distributed system. For each field, it specifies how it should
* be encrypted.
*/
protected EncryptedFieldTable fieldTable;
As you see, the configuration mechanism is superficially similar to the mechanism for Adapter Configuration. However, the configuration problem is a different one. The EncryptedFieldTable is simply a table with few functional properties. The configuration information is in the information contained in the table. There are at least three ways to put document configuration in the table:
Although the third method is the least general, it is more than sufficient for current test and demonstration purposes. To see how the table is set in DemoZero please refer to the function: pygar.demo0P.ProfileDemo0.initFieldTable()