Ejemplo n.º 1
0
    def verify_finger(self, fprint):
        """
		Compare the finger on the device with the supplied Fprint.
		Return true if the finger and the Fprint matches.
		"""
        if not self.dev:
            raise "Device not open"
        (r, img) = pyf.pyfp_verify_finger_img(self.dev,
                                              fprint._get_print_data_ptr())
        img = Image(img)
        if r < 0:
            raise "verify error: %i" % r
        if r == pyf.FP_VERIFY_NO_MATCH:
            return (False, img)
        if r == pyf.FP_VERIFY_MATCH:
            return (True, img)
        if r == pyf.FP_VERIFY_RETRY:
            pass
        if r == pyf.FP_VERIFY_RETRY_TOO_SHORT:
            pass
        if r == pyf.FP_VERIFY_RETRY_CENTER_FINGER:
            pass
        if r == pyf.FP_VERIFY_RETRY_REMOVE_FINGER:
            pass
        return (None, None)
	def verify_finger(self, fprint):
		if not self.dev:
			raise "Device not open"
		(r, img) = pyf.pyfp_verify_finger_img(self.dev, fprint._get_print_data_ptr())
		if r < 0:
			raise "verify error"
		img = Image(img)
		if r == pyf.FP_VERIFY_NO_MATCH:
			return (False, img)
		if r == pyf.FP_VERIFY_MATCH:
			return (True, img)
		if r == pyf.FP_VERIFY_RETRY:
			pass
		if r == pyf.FP_VERIFY_RETRY_TOO_SHORT:
			pass
		if r == pyf.FP_VERIFY_RETRY_CENTER_FINGER:
			pass
		if r == pyf.FP_VERIFY_RETRY_REMOVE_FINGER:
			pass
		return (None, None)
Ejemplo n.º 3
0
	def verify_finger(self, fprint):
		"""
		Compare the finger on the device with the supplied Fprint.
		Return true if the finger and the Fprint matches.
		"""
		if not self.dev:
			raise "Device not open"
		(r, img) = pyf.pyfp_verify_finger_img(self.dev, fprint._get_print_data_ptr())
		img = Image(img)
		if r < 0:
			raise "verify error: %i" % r
		if r == pyf.FP_VERIFY_NO_MATCH:
			return (False, img)
		if r == pyf.FP_VERIFY_MATCH:
			return (True, img)
		if r == pyf.FP_VERIFY_RETRY:
			pass
		if r == pyf.FP_VERIFY_RETRY_TOO_SHORT:
			pass
		if r == pyf.FP_VERIFY_RETRY_CENTER_FINGER:
			pass
		if r == pyf.FP_VERIFY_RETRY_REMOVE_FINGER:
			pass
		return (None, None)