Crate libfprint_rs

source ·
Expand description

Rust bindings for libfprint

This crate provides a wrapper around the libfprint library, which allows you to use fingerprint scanners in your Rust applications.

Enrolling a new fingerprint

use libfprint_rs::{FpContext, FpPrint, GError};

let context = FpContext::new();
let devices = context.get_devices();

let dev = devices.iter().next().unwrap();
dev.open()?;

let template = FpPrint::new(&dev);
template.set_username("Bruce Banner");

dev.enroll(template, None, None::<()>)?;

Verifying a fingerprint

use libfprint_rs::{FpContext, FpPrint, GError};
let context = FpContext::new();
let devices = context.get_devices();

let dev = devices.iter().next().unwrap();
dev.open()?;

let enrolled_print = load_print_from_file();

dev.verify(enrolled_print, None, None::<()>, None)?;

Structs

  • DeviceList — List of fingerprint devices This struct will allow you to iterate over the fingerprint devices.
  • Collection of fingerprint devices This struct will allow you to iterate with the fingerprint devices available in the system.
  • The FpContext allows you to discover fingerprint scanning hardware. This is the starting point when integrating libfprint-rs into your software.
  • Fingerpint device routines
  • Struct representing an image of a fingerprint. Not all devices support this feature.
  • Struct representing a fingerprint.
  • Struct representing an error while scanning a fingerprint, interacting with the device, etc.
  • Struct representing a serialized fingerprint.

Enums

  • Enum representing a finger. This can be used to specify which finger was used to enroll a new print and can be added as part of the print metadata.
  • Enum representing the different features that a device may support. This is used to query the device capabilities.
  • Enum representing the different types of scans that a device may support.

Type Definitions