1FIDO_BIO_TEMPLATE(3)     BSD Library Functions Manual     FIDO_BIO_TEMPLATE(3)
2

NAME

4     fido_bio_template, fido_bio_template_array_count,
5     fido_bio_template_array_free, fido_bio_template_array_new,
6     fido_bio_template_free, fido_bio_template_id_len,
7     fido_bio_template_id_ptr, fido_bio_template_name, fido_bio_template_new,
8     fido_bio_template_set_id, fido_bio_template_set_name — FIDO 2 biometric
9     template API
10

SYNOPSIS

12     #include <fido.h>
13     #include <fido/bio.h>
14
15     fido_bio_template_t *
16     fido_bio_template_new(void);
17
18     void
19     fido_bio_template_free(fido_bio_template_t **template_p);
20
21     const char *
22     fido_bio_template_name(const fido_bio_template_t *template);
23
24     const unsigned char *
25     fido_bio_template_id_ptr(const fido_bio_template_t *template);
26
27     size_t
28     fido_bio_template_id_len(const fido_bio_template_t *template);
29
30     int
31     fido_bio_template_set_id(fido_bio_template_t *template,
32         const unsigned char *ptr, size_t len);
33
34     int
35     fido_bio_template_set_name(fido_bio_template_t *template,
36         const char *name);
37
38     fido_bio_template_array_t *
39     fido_bio_template_array_new(void);
40
41     void
42     fido_bio_template_array_free(fido_bio_template_array_t **template_array_p);
43
44     size_t
45     fido_bio_template_array_count(const fido_bio_template_array_t *template_array);
46
47     const fido_bio_template_t *
48     fido_bio_template(const fido_bio_template_array_t *template_array,
49         size_t idx);
50

DESCRIPTION

52     Existing FIDO 2 biometric enrollments are abstracted in libfido2 by the
53     fido_bio_template_t and fido_bio_template_array_t types.
54
55     The functions described in this page allow a fido_bio_template_t type to
56     be allocated, deallocated, changed, and inspected, and a
57     fido_bio_template_array_t type to be allocated, deallocated, and
58     inspected.  For device operations on fido_bio_template_t and
59     fido_bio_template_array_t, please refer to fido_bio_dev_get_info(3).
60
61     The fido_bio_template_new() function returns a pointer to a newly allo‐
62     cated, empty fido_bio_template_t type.  If memory cannot be allocated,
63     NULL is returned.
64
65     The fido_bio_template_free() function releases the memory backing
66     *template_p, where *template_p must have been previously allocated by
67     fido_bio_template_new().  On return, *template_p is set to NULL.  Either
68     template_p or *template_p may be NULL, in which case
69     fido_bio_template_free() is a NOP.
70
71     The fido_bio_template_name() function returns a pointer to a NUL-termi‐
72     nated string containing the friendly name of template, or NULL if
73     template does not have a friendly name set.
74
75     The fido_bio_template_id_ptr() function returns a pointer to the template
76     id of template, or NULL if template does not have an id.  The correspond‐
77     ing length can be obtained by fido_bio_template_id_len().
78
79     The fido_bio_template_set_name() function sets the friendly name of
80     template to name.  If name is NULL, the friendly name of template is
81     unset.
82
83     The fido_bio_template_array_new() function returns a pointer to a newly
84     allocated, empty fido_bio_template_array_t type.  If memory cannot be
85     allocated, NULL is returned.
86
87     The fido_bio_template_array_free() function releases the memory backing
88     *template_array_p, where *template_array_p must have been previously
89     allocated by fido_bio_template_array_new().  On return, *template_array_p
90     is set to NULL.  Either template_array_p or *template_array_p may be
91     NULL, in which case fido_bio_template_array_free() is a NOP.
92
93     The fido_bio_template_array_count() function returns the number of tem‐
94     plates in template_array.
95
96     The fido_bio_template() function returns a pointer to the template at
97     index idx in template_array.  Please note that the first template in
98     template_array has an idx (index) value of 0.
99

SEE ALSO

101     fido_bio_dev_get_info(3), fido_bio_enroll_new(3)
102
103BSD                              May 10, 2020                              BSD
Impressum