public interface BioMatcher
BioMatcher interface is the base interface for biometric
matching. It provides the user interface for accessing biometric
functionality.
BioTemplateData) can be enrolled
in the same BioMatcher. BioMatcher is supporting both 1 to 1
matching and 1 to N matching when N BioTemplateData instances are
enrolled.| Modifier and Type | Field and Description |
|---|---|
static short |
MATCH_NEEDS_MORE_DATA
This negative score value indicates that more data are needed to continue
the matching session.
|
static short |
MINIMUM_SUCCESSFUL_MATCH_SCORE
The minimum successful matching score.
|
| Modifier and Type | Method and Description |
|---|---|
BioTemplateData |
getBioTemplateData(short index)
Get the
BioTemplateData enrolled at the specified index. |
byte |
getBioType()
Gets the biometric type.
|
short |
getIndexOfLastMatchingBioTemplateData()
Gets the index of the last matching
BioTemplateData. |
short |
getMaxNbOfBioTemplateData()
Gets the maximum number of
BioTemplateData that can be enrolled in
this BioMatcher. |
byte |
getTriesRemaining()
Gets the number of times remaining that an incorrect candidate can be
presented before the
BioMatcher is blocked. |
short |
getVersion(byte[] dest,
short offset)
Gets the matching algorithm version and ID.
|
short |
initMatch(byte[] candidate,
short offset,
short length)
Initialize or re-initialize a biometric matching session.
|
boolean |
isInitialized()
Indicates whether this
BioMatcher has been loaded with at least one
BioTemplateData and is ready for matching functions. |
boolean |
isValidated()
Indicates whether a matching session was successfully since the last card
reset or last call to
reset(). |
short |
match(byte[] candidate,
short offset,
short length)
Continues a biometric matching session.
|
void |
reset()
Resets the
validated flag associated with this BioMatcher. |
static final short MINIMUM_SUCCESSFUL_MATCH_SCORE
static final short MATCH_NEEDS_MORE_DATA
boolean isInitialized()
BioMatcher has been loaded with at least one
BioTemplateData and is ready for matching functions. This is
independent of whether or not the match process has been initialized (see
initMatch).true if initialized, false otherwise.boolean isValidated()
reset().
In addition to returning a boolean result, platform-implementations
of this method set the result in an internal state which can be rechecked
using assertion methods of the
SensitiveResult class, if
supported by the platform.true if validated, false otherwise.void reset()
validated flag associated with this BioMatcher.
This could be appropriate as a last action after an access is completed.byte getTriesRemaining()
BioMatcher is blocked.
In addition to returning a byte result, platform-implementations of
this method set the result in an internal state which can be rechecked
using assertion methods of the
SensitiveResult class, if
supported by the platform.Bio1toNException - with the following reason codes:
Bio1toNException.NO_BIO_TEMPLATE_ENROLLED if no
BioTemplateData has been enrolled.byte getBioType()
Bio1toNBuilder.short getVersion(byte[] dest,
short offset)
dest - destination byte array.offset - starting offset within the destination byte array.short initMatch(byte[] candidate,
short offset,
short length)
throws Bio1toNException
BioMatcher is not blocked, a matching session starts and, before
any other processing, the validated flag is reset, the internal
match state is set to MATCH_NEEDS_MORE_DATA, and the try counter
is decremented. If the try counter has reached zero, the this
BioMatcher is blocked. This method results in one of the following:
BioTemplateData enrolled with this BioMatcher is matching.
The validated flag is set and the try counter is reset to its maximum.
BioTemplateData enrolled with this BioMatcher is matching.
The validated flag remains in the reset state.
match method has to be called to continue the matching
session.
If this BioMatcher is blocked, no matching session starts.
Notes:
initMatch,[match]. Calling
initMatch is mandatory, calling match is optional.
initMatch makes the current session to be discarded and starts a
new matching session.
short result, platform-implementations
of this method set the result in an internal state which can be rechecked
using assertion methods of the
SensitiveResult class, if
supported by the platform.
SensitiveResult:
try {
short matchResult = bioMatcher.initMatch( ...);
SensitiveResult.assertEquals(matchResult); // recheck for security
while (matchResult == MATCH_NEEDS_MORE_DATA) {
matchResult = bioMatcher.match(...);
}
SensitiveResult.assertEquals(matchResult); // recheck for security
if ((matchResult >= MINIMUM_SUCCESSFUL_MATCH_SCORE) {
// grant service - user authenticated
} else {
// deny service - Bio Template mismatch
}
} finally {
SensitiveResult.reset();
}
candidate - the data or part of the data of the candidate.offset - the starting offset into the candidate array where the
candidate data is to be found.length - the number of bytes to be taken from the candidate array.MINIMUM_SUCCESSFUL_MATCH_SCORE : the matching session is successful.MINIMUM_SUCCESSFUL_MATCH_SCORE : the matching session has
failed.MATCH_NEEDS_MORE_DATA : the matching session needs more data.Bio1toNException - with the following reason codes:
Bio1toNException.INVALID_DATA if the submitted candidate data
does not have the required format.Bio1toNException.NO_BIO_TEMPLATE_ENROLLED if no
BioTemplateData has been enrolled.short match(byte[] candidate,
short offset,
short length)
throws Bio1toNException
BioTemplateData enrolled in this BioMatcher matches. The
validated flag is set and the try counter is reset to its maximum.
BioTemplateDatas enrolled in this BioMatcher are matching.
match method has to be called to continue the matching session.
initMatch,[match]. Calling
initMatch is mandatory, calling match is optional.
short result, platform-implementations
of this method set the result in an internal state which can be rechecked
using assertion methods of the
SensitiveResult class, if
supported by the platform.
SensitiveResult:
try {
short matchResult = bioMatcher.initMatch( ...);
SensitiveResult.assertEquals(matchResult); // recheck for security
while (matchResult == MATCH_NEEDS_MORE_DATA) {
matchResult = bioMatcher.match(...);
}
SensitiveResult.assertEquals(matchResult); // recheck for security
if ((matchResult >= MINIMUM_SUCCESSFUL_MATCH_SCORE) {
// grant service - user authenticated
} else {
// deny service - Bio Template mismatch
}
} finally {
SensitiveResult.reset();
}
candidate - the data or part of the data of the candidate.offset - the 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.MINIMUM_SUCCESSFUL_MATCH_SCORE : the matching session
is successful.MINIMUM_SUCCESSFUL_MATCH_SCORE : the
matching session has failed.MATCH_NEEDS_MORE_DATA : the matching session needs more data.Bio1toNException - with the following reason codes:
Bio1toNException.ILLEGAL_USE if used outside a matching
session.Bio1toNException.INVALID_DATA if the submitted candidate data
does not have the required format. Bio1toNException.NO_BIO_TEMPLATE_ENROLLED if no
BioTemplateData have been enrolled.short getMaxNbOfBioTemplateData()
BioTemplateData that can be enrolled in
this BioMatcher.BioTemplateData that can be
enrolled.short getIndexOfLastMatchingBioTemplateData()
BioTemplateData.BioTemplateData.Bio1toNException - with the following reason codes:
Bio1toNException.ILLEGAL_USE if no successful match occurred
since last reset.BioTemplateData getBioTemplateData(short index)
BioTemplateData enrolled at the specified index.
This method is used to retrieve the BioTemplateData for readonly
use.index - the index of the BioTemplateData to retrieve.null if no BioTemplateData is available at the
specified index.Copyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.