src/com/makina/security/OpenFIPS201/PIV.java
private void createDataObject(byte id, byte modeContact, byte modeContactess) {

        final byte ID_DISCOVERY = (byte)0x7E;

        // Create our new key
        PIVDataObject data = new PIVDataObject(id, modeContact, modeContactess);

        // Check if this is the first key added
        if (firstDataObject == null) {
            firstDataObject = data;
            return;
        }

        // Find the last data object in the linked list
        PIVObject last = firstDataObject;
        while (last.nextObject != null) {
            last = last.nextObject;
        }

        // Assign the next object
        last.nextObject = data;


        //
        // SPECIAL OBJECT - Discovery Data
        // This automatically populates the discovery object if it is added, based on our compiled
        // configuration
        //
        if (Config.FEATURE_DISCOVERY_OBJECT_DEFAULT && ID_DISCOVERY == id) {

            data.allocate((short)Config.DEFAULT_DISCOVERY.length);

            Util.arrayCopyNonAtomic(Config.DEFAULT_DISCOVERY, (short)0,
                                    data.content,
                                    (short)0,
                                    (short)Config.DEFAULT_DISCOVERY.length);
        }
    }
/**
     * Adds a data object to the data store
     * @param The id of the data object to create (just the LSB)
     * @param The contact Access Mode control flags
     * @param The contactless Access Mode control flags
     */
Adds a data object to the data store
@param The id of the data object to create (just the LSB)
@param The contact Access Mode control flags
@param The contactless Access Mode control flags
Adds a data object to the data store @param The id of the data object to create ( just the LSB ) @param The contact Access Mode control flags @param The contactless Access Mode control flags
private void createDataObject(byte id, byte modeContact, byte modeContactess) {
        final byte ID_DISCOVERY = (byte)0x7E;
        PIVDataObject data = new PIVDataObject(id, modeContact, modeContactess);
        if (firstDataObject == null) {
            firstDataObject = data;
            return;
        }
        PIVObject last = firstDataObject;
        while (last.nextObject != null) {
            last = last.nextObject;
        }
        last.nextObject = data;
         SPECIAL OBJECT - Discovery Data
         This automatically populates the discovery object if it is added, based on our compiled
         configuration
        if (Config.FEATURE_DISCOVERY_OBJECT_DEFAULT && ID_DISCOVERY == id) {
            data.allocate((short)Config.DEFAULT_DISCOVERY.length);
            Util.arrayCopyNonAtomic(Config.DEFAULT_DISCOVERY, (short)0,
                                    data.content,
                                    (short)0,
                                    (short)Config.DEFAULT_DISCOVERY.length);
        }
    }
private void createDataObject ( byte id , byte modeContact , byte modeContactess ) { final byte ID_DISCOVERY = ( byte ) 0x7E ; PIVDataObject data = new PIVDataObject ( id , modeContact , modeContactess ) ; if ( firstDataObject == null ) { firstDataObject = data ; return ; } PIVObject last = firstDataObject ; while ( last . nextObject != null ) { last = last . nextObject ; } last . nextObject = data ; if ( Config . FEATURE_DISCOVERY_OBJECT_DEFAULT && ID_DISCOVERY == id ) { data . allocate ( ( short ) Config . DEFAULT_DISCOVERY . length ) ; Util . arrayCopyNonAtomic ( Config . DEFAULT_DISCOVERY , ( short ) 0 , data . content , ( short ) 0 , ( short ) Config . DEFAULT_DISCOVERY . length ) ; } }
Adds a data object to the data store
 @param The id of the data object to create (just the LSB)
 @param The contact Access Mode control flags
 @param The contactless Access Mode control flags
Adds a data object to the data store @param The id of the data object to create ( just the LSB ) @param The contact Access Mode control flags @param The contactless Access Mode control flags
// Create our new key // Check if this is the first key added // Find the last data object in the linked list // Assign the next object // // SPECIAL OBJECT - Discovery Data // This automatically populates the discovery object if it is added, based on our compiled // configuration //