Class BiometricsProperties.BiometricInformationRecord
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.biometrics.BiometricsProperties.BiometricInformationRecord
- Enclosing class:
- BiometricsProperties
Helper class for Biometric Information Record (BIR) interpretation. Based on the BioAPI 1.1 reference
implementation on Github.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
Constant for biometric type conforming to BioAPI auth factor FACIAL_FEATURES.static int
Constant for biometric type conforming to BioAPI auth factor FINGERPRINT.static int
Constant for biometric type conforming to BioAPI auth factor GAIT.static int
Constant for biometric type conforming to BioAPI auth factor HAND_GEOMETRY.static int
Constant for biometric type conforming to BioAPI auth factor IRIS.static int
Constant for biometric type conforming to BioAPI auth factor KEYSTOKE_DYNAMICS.static int
Constant for biometric type conforming to BioAPI auth factor LIP_MOVEMENT.static int
Constant for biometric type conforming to BioAPI auth factor MULTIPLE.static int
Constant for biometric type conforming to BioAPI auth factor PASSWORD.static int
Constant for biometric type conforming to BioAPI auth factor RETINA.static int
Constant for biometric type conforming to BioAPI auth factor SIGNATURE_DYNAMICS.static int
Constant for biometric type conforming to BioAPI auth factor THERMAL_FACE_IMAGE.static int
Constant for biometric type conforming to BioAPI auth factor THERMAL_HAND_IMAGE.static int
Constant for biometric type conforming to BioAPI auth factor VOICE.static int
Offset of the Biometric Data Block (BDB), equals to the BIR header length.static int
Constant for BIR data type conforming to BioAPI type ENCRYPTED.static int
Constant for BIR data type conforming to BioAPI type INTERMEDIATE.static int
Constant for BIR data type conforming to BioAPI type PROCESSED.static int
Constant for BIR data type conforming to BioAPI type RAW.static int
Constant for BIR data type conforming to BioAPI type SIGNED.static int
Constant for BIR data type conforming to BioAPI purpose AUDIT.static int
Constant for BIR data type conforming to BioAPI purpose ENROLL.static int
Constant for BIR data type conforming to BioAPI purpose ENROLL_FOR_IDENTIFICATION_ONLY.static int
Constant for BIR data type conforming to BioAPI purpose ENROLL_FOR_VERIFICATION_ONLY.static int
Constant for BIR data type conforming to BioAPI purpose IDENTIFY.static int
Constant for BIR data type conforming to BioAPI purpose VERIFY.static int
Constant for BIR quality conforming to BioAPI type Quality.static int
Constant for BIR quality conforming to BioAPI type Quality. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSignature(byte[] signature)
Add signature to biometric properties.byte[]
Retrieves the biometric data block.int
Biometric Type getter.int
BIR Data Type getter.byte[]
getBytes()
Extracts byte array containing the representation of the BIR as byte array, as required by UPOS Biometrics.int
Format ID component Owner getter.int
Format ID component Type getter.int
Header Version getter.int
Length getter.int
Purpose getter.int
Quality getter.void
setBiometricDataBlock(byte[] bdb)
Sets the biometric data blockvoid
setBiometricType(int biometricType)
Biometric Type setter.void
setBIRDataType(int birDataType)
BIR Data Type setter.void
setFormatIDOwner(int owner)
Format ID component Owner setter.void
setFormatIDType(int type)
Format ID component Type setter.void
setHeaderVersion(int version)
Header Version setter.void
setLength(int length)
Length setter.void
setPurpose(int purpose)
Purpose setter.void
setQuality(int quality)
Quality setter.
-
Field Details
-
BiometricDataBlockOffset
public static final int BiometricDataBlockOffsetOffset of the Biometric Data Block (BDB), equals to the BIR header length.- See Also:
- Constant Field Values
-
DATA_TYPE_RAW
public static final int DATA_TYPE_RAWConstant for BIR data type conforming to BioAPI type RAW.- See Also:
- Constant Field Values
-
DATA_TYPE_INTERMEDIATE
public static final int DATA_TYPE_INTERMEDIATEConstant for BIR data type conforming to BioAPI type INTERMEDIATE.- See Also:
- Constant Field Values
-
DATA_TYPE_PROCESSED
public static final int DATA_TYPE_PROCESSEDConstant for BIR data type conforming to BioAPI type PROCESSED.- See Also:
- Constant Field Values
-
DATA_TYPE_ENCRYPTED
public static final int DATA_TYPE_ENCRYPTEDConstant for BIR data type conforming to BioAPI type ENCRYPTED.- See Also:
- Constant Field Values
-
DATA_TYPE_SIGNED
public static final int DATA_TYPE_SIGNEDConstant for BIR data type conforming to BioAPI type SIGNED.- See Also:
- Constant Field Values
-
QUALITY_NOT_SET
public static final int QUALITY_NOT_SETConstant for BIR quality conforming to BioAPI type Quality.- See Also:
- Constant Field Values
-
QUALITY_NOT_SUPPORTED
public static final int QUALITY_NOT_SUPPORTEDConstant for BIR quality conforming to BioAPI type Quality.- See Also:
- Constant Field Values
-
PURPOSE_VERIFY
public static final int PURPOSE_VERIFYConstant for BIR data type conforming to BioAPI purpose VERIFY.- See Also:
- Constant Field Values
-
PURPOSE_IDENTIFY
public static final int PURPOSE_IDENTIFYConstant for BIR data type conforming to BioAPI purpose IDENTIFY.- See Also:
- Constant Field Values
-
PURPOSE_ENROLL
public static final int PURPOSE_ENROLLConstant for BIR data type conforming to BioAPI purpose ENROLL.- See Also:
- Constant Field Values
-
PURPOSE_ENROLL_FOR_VERIFICATION
public static final int PURPOSE_ENROLL_FOR_VERIFICATIONConstant for BIR data type conforming to BioAPI purpose ENROLL_FOR_VERIFICATION_ONLY.- See Also:
- Constant Field Values
-
PURPOSE_ENROLL_FOR_IDENTIFICATION
public static final int PURPOSE_ENROLL_FOR_IDENTIFICATIONConstant for BIR data type conforming to BioAPI purpose ENROLL_FOR_IDENTIFICATION_ONLY.- See Also:
- Constant Field Values
-
PURPOSE_AUDIT
public static final int PURPOSE_AUDITConstant for BIR data type conforming to BioAPI purpose AUDIT.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_MULTIPLE
public static final int BIOMETRIC_TYPE_MULTIPLEConstant for biometric type conforming to BioAPI auth factor MULTIPLE.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_FACIAL_FEATURES
public static final int BIOMETRIC_TYPE_FACIAL_FEATURESConstant for biometric type conforming to BioAPI auth factor FACIAL_FEATURES.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_VOICE
public static final int BIOMETRIC_TYPE_VOICEConstant for biometric type conforming to BioAPI auth factor VOICE.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_FINGERPRINT
public static final int BIOMETRIC_TYPE_FINGERPRINTConstant for biometric type conforming to BioAPI auth factor FINGERPRINT.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_IRIS
public static final int BIOMETRIC_TYPE_IRISConstant for biometric type conforming to BioAPI auth factor IRIS.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_RETINA
public static final int BIOMETRIC_TYPE_RETINAConstant for biometric type conforming to BioAPI auth factor RETINA.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_HAND_GEOMETRY
public static final int BIOMETRIC_TYPE_HAND_GEOMETRYConstant for biometric type conforming to BioAPI auth factor HAND_GEOMETRY.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_SIGNATURE_DYNAMICS
public static final int BIOMETRIC_TYPE_SIGNATURE_DYNAMICSConstant for biometric type conforming to BioAPI auth factor SIGNATURE_DYNAMICS.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_KEYSTOKE_DYNAMICS
public static final int BIOMETRIC_TYPE_KEYSTOKE_DYNAMICSConstant for biometric type conforming to BioAPI auth factor KEYSTOKE_DYNAMICS.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_LIP_MOVEMENT
public static final int BIOMETRIC_TYPE_LIP_MOVEMENTConstant for biometric type conforming to BioAPI auth factor LIP_MOVEMENT.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_THERMAL_FACE_IMAGE
public static final int BIOMETRIC_TYPE_THERMAL_FACE_IMAGEConstant for biometric type conforming to BioAPI auth factor THERMAL_FACE_IMAGE.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_THERMAL_HAND_IMAGE
public static final int BIOMETRIC_TYPE_THERMAL_HAND_IMAGEConstant for biometric type conforming to BioAPI auth factor THERMAL_HAND_IMAGE.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_GAIT
public static final int BIOMETRIC_TYPE_GAITConstant for biometric type conforming to BioAPI auth factor GAIT.- See Also:
- Constant Field Values
-
BIOMETRIC_TYPE_PASSWORD
public static final int BIOMETRIC_TYPE_PASSWORDConstant for biometric type conforming to BioAPI auth factor PASSWORD.- See Also:
- Constant Field Values
-
-
Constructor Details
-
BiometricInformationRecord
public BiometricInformationRecord(byte[] bir)Constructor. Creates a BIR from byte array.- Parameters:
bir
- Byte array representing the BIR.
-
BiometricInformationRecord
public BiometricInformationRecord()Default constructor. Creates empty BIR.
-
-
Method Details
-
getBytes
public byte[] getBytes()Extracts byte array containing the representation of the BIR as byte array, as required by UPOS Biometrics.- Returns:
- Byte array interpretation of this object.
-
getLength
public int getLength()Length getter.- Returns:
- Length of BIR (without optional signature).
-
setLength
public void setLength(int length) throws jpos.JposExceptionLength setter. Must be at least the header size.- Parameters:
length
- New value for Length field.- Throws:
jpos.JposException
- if length is less than the BIR header length (16).
-
getHeaderVersion
public int getHeaderVersion()Header Version getter.- Returns:
- Header version.
-
setHeaderVersion
public void setHeaderVersion(int version) throws jpos.JposExceptionHeader Version setter.- Parameters:
version
- New version value. Must be between zero and 0xff (255).- Throws:
jpos.JposException
- If version is out of range.
-
getBIRDataType
public int getBIRDataType()BIR Data Type getter.- Returns:
- BIR data type.
-
setBIRDataType
public void setBIRDataType(int birDataType) throws jpos.JposExceptionBIR Data Type setter.- Parameters:
birDataType
- New birDataType value. Must be between zero and 0xff (255).- Throws:
jpos.JposException
- If birDataType is out of range.
-
getFormatIDOwner
public int getFormatIDOwner()Format ID component Owner getter.- Returns:
- Format ID component Owner.
-
setFormatIDOwner
public void setFormatIDOwner(int owner) throws jpos.JposExceptionFormat ID component Owner setter. Must be between zero and 0xffff.- Parameters:
owner
- New value for Length field.- Throws:
jpos.JposException
- if owner is out of range.
-
getFormatIDType
public int getFormatIDType()Format ID component Type getter.- Returns:
- Format ID component Type.
-
setFormatIDType
public void setFormatIDType(int type) throws jpos.JposExceptionFormat ID component Type setter. Must be between zero and 0xffff.- Parameters:
type
- New value for Length field.- Throws:
jpos.JposException
- if type is out of range.
-
getQuality
public int getQuality()Quality getter.- Returns:
- Quality.
-
setQuality
public void setQuality(int quality) throws jpos.JposExceptionQuality setter.- Parameters:
quality
- New quality value. Must be between -100 (lowest quality) and 100 (highest quality) or one of QUALITY_NOT_SET or QUALITY_NOT_SUPPORTED.- Throws:
jpos.JposException
- If quality is out of range.
-
getPurpose
public int getPurpose()Purpose getter.- Returns:
- Purpose.
-
setPurpose
public void setPurpose(int purpose) throws jpos.JposExceptionPurpose setter.- Parameters:
purpose
- New purpose value. Must be between zero and 0xff (255).- Throws:
jpos.JposException
- If purpose is out of range.
-
getBiometricType
public int getBiometricType()Biometric Type getter.- Returns:
- Biometric type.
-
setBiometricType
public void setBiometricType(int biometricType)Biometric Type setter.- Parameters:
biometricType
- New value for Length field.
-
getBiometricDataBlock
public byte[] getBiometricDataBlock()Retrieves the biometric data block.- Returns:
- The biometric data block, if the BIR contains a biometric data block, null if the BIR is empty or if the Length field of the BIR is invalid (less than header size, greater than BIR size).
-
setBiometricDataBlock
public void setBiometricDataBlock(byte[] bdb)Sets the biometric data block- Parameters:
bdb
- Biometric data block
-
addSignature
public void addSignature(byte[] signature)Add signature to biometric properties.- Parameters:
signature
- Any device specific signature data.
-