org.javacardforum.javacard.biometry
Interface BioTemplate

All Known Subinterfaces:
OwnerBioTemplate, SharedBioTemplate

public interface BioTemplate

The BioTemplate interface is the base interface for all biometric templates. It provides to the user the means for accessing biometric functionality.

See Also:
OwnerBioTemplate

Field Summary
static short MATCH_NEEDS_MORE_DATA
          This score value indicates that more data are needed to continue the matching session.
static short MINIMUM_SUCCESSFUL_MATCH_SCORE
          The minimum successful matching score.
 
Method Summary
 byte getBioType()
          Get the biometric type.
 short getPublicTemplateData(short publicOffset, byte[] dest, short destOffset, short length)
          Get public part of the reference template.
 byte getTriesRemaining()
          Returns the number of times remaining that an incorrect candidate template can be presented before the reference template is blocked.
 short getVersion(byte[] dest, short destOffset)
          Get the matching algorithm version and ID.
 short initMatch(byte[] candidateTemplate, short offset, short length)
          Initialize or re-initialize a biometric matching session.
 boolean isInitialized()
          Returns true if the reference template is completely loaded and ready for matching functions.
 boolean isValidated()
          Returns true if the template has been successfully checked since the last card reset or last call to reset().
 short match(byte[] candidateTemplate, short offset, short length)
          Continues a biometric matching session.
 void reset()
          Resets the reference validated flag.
 

Field Detail

MINIMUM_SUCCESSFUL_MATCH_SCORE

public static final short MINIMUM_SUCCESSFUL_MATCH_SCORE
The minimum successful matching score.

See Also:
Constant Field Values

MATCH_NEEDS_MORE_DATA

public static final short MATCH_NEEDS_MORE_DATA
This score value indicates that more data are needed to continue the matching session.

See Also:
Constant Field Values
Method Detail

isValidated

public boolean isValidated()
Returns true if the template has been successfully checked since the last card reset or last call to reset().

Returns:
true if validated, false otherwise.

isInitialized

public boolean isInitialized()
Returns true if the reference template is completely loaded and ready for matching functions. This is independent of whether or not the match process has been initialized (see initMatch(byte[], short, short)).

Returns:
true if initialized, false otherwise.

getPublicTemplateData

public short getPublicTemplateData(short publicOffset,
                                   byte[] dest,
                                   short destOffset,
                                   short length)
                            throws BioException
Get public part of the reference template. It copies all or a piece of the reference public data to the destination array.

Parameters:
publicOffset - starting offset within the public data.
dest - destination byte array.
destOffset - starting offset within the destination byte array.
length - maximum length (in bytes) of the requested data.
Returns:
number of bytes really written in the destination byte array; 0 if public data is not available
Throws:
BioException - with reason BioException.ILLEGAL_VALUE if the reference template is uninitialized.

getBioType

public byte getBioType()
Get the biometric type. Valid type are described in BioBuilder.

Returns:
biometric general type.

getVersion

public short getVersion(byte[] dest,
                        short destOffset)
Get the matching algorithm version and ID.

Parameters:
dest - destination byte array.
destOffset - starting offset within the destination byte array.
Returns:
number of bytes written in the destination byte array.

reset

public void reset()
Resets the reference validated flag. This could be appropriate as a last action after an access is completed.


getTriesRemaining

public byte getTriesRemaining()
Returns the number of times remaining that an incorrect candidate template can be presented before the reference template is blocked.

Returns:
the number of tries remaining.

initMatch

public short initMatch(byte[] candidateTemplate,
                       short offset,
                       short length)
                throws BioException
Initialize or re-initialize a biometric matching session. The exact return score value is implementation dependent and can be used, for example, to code a confidence rate. If the reference is not blocked, a matching session starts and, before any other processing, the validated flag is reset, the try counter is decremented if it has reached zero, the reference is blocked.

This method makes the matching session:

Notes:

Parameters:
candidateTemplate - the data or part of the data of the candidate template.
offset - starting offset into the candidate array where the candidate data is to be found.
length - number of bytes to be taken from the candidate array.
Returns:
the matching score with the following meaning:
Throws:
BioException - with reason BioException.INVALID_DATA if the submitted candidate template data does not have the required format.
BioException - with reason BioException.NO_TEMPLATES_ENROLLED if the reference template is uninitialized.

match

public short match(byte[] candidateTemplate,
                   short offset,
                   short length)
            throws BioException
Continues a biometric matching session. The exact return score value is implementation dependant and can be used, for example, to code a confidence rate.

If a matching session is in progress, this method makes the session:

Notes:

Parameters:
candidateTemplate - the data or part of the data of the candidate template.
offset - starting offset into the candidate array where the candidate data is to be found.
length - number of bytes to be taken from the candidate array.
Returns:
the matching score with the following meaning:
Throws:
BioException - with reason BioException.ILLEGAL_USE if used outside a matching session.
BioException - with reason BioException.INVALID_DATA if the submitted candidate template data does not have the required format.
BioException - with reason BioException.NO_TEMPLATES_ENROLLED if the reference template is uninitialized.


Prepared by: NIST/Biometric Consortium Biometric Interoperability, Assurance, and Performance Working Group