Sindbad~EG File Manager
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
Copyright (c) 2019 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-2-Clause
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="style.css" type="text/css" media="all"/>
<title>FIDO_BIO_TEMPLATE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">FIDO_BIO_TEMPLATE(3)</td>
<td class="head-vol">FreeBSD Library Functions Manual</td>
<td class="head-rtitle">FIDO_BIO_TEMPLATE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">fido_bio_template</code>,
<code class="Nm">fido_bio_template_array_count</code>,
<code class="Nm">fido_bio_template_array_free</code>,
<code class="Nm">fido_bio_template_array_new</code>,
<code class="Nm">fido_bio_template_free</code>,
<code class="Nm">fido_bio_template_id_len</code>,
<code class="Nm">fido_bio_template_id_ptr</code>,
<code class="Nm">fido_bio_template_name</code>,
<code class="Nm">fido_bio_template_new</code>,
<code class="Nm">fido_bio_template_set_id</code>,
<code class="Nm">fido_bio_template_set_name</code> —
<div class="Nd">FIDO2 biometric template API</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include <<a class="In">fido.h</a>></code>
<br/>
<code class="In">#include <<a class="In">fido/bio.h</a>></code>
<p class="Pp"><var class="Ft">fido_bio_template_t *</var>
<br/>
<code class="Fn">fido_bio_template_new</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">fido_bio_template_free</code>(<var class="Fa" style="white-space: nowrap;">fido_bio_template_t
**template_p</var>);</p>
<p class="Pp"><var class="Ft">const char *</var>
<br/>
<code class="Fn">fido_bio_template_name</code>(<var class="Fa" style="white-space: nowrap;">const
fido_bio_template_t *template</var>);</p>
<p class="Pp"><var class="Ft">const unsigned char *</var>
<br/>
<code class="Fn">fido_bio_template_id_ptr</code>(<var class="Fa" style="white-space: nowrap;">const
fido_bio_template_t *template</var>);</p>
<p class="Pp"><var class="Ft">size_t</var>
<br/>
<code class="Fn">fido_bio_template_id_len</code>(<var class="Fa" style="white-space: nowrap;">const
fido_bio_template_t *template</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_bio_template_set_id</code>(<var class="Fa" style="white-space: nowrap;">fido_bio_template_t
*template</var>, <var class="Fa" style="white-space: nowrap;">const unsigned
char *ptr</var>, <var class="Fa" style="white-space: nowrap;">size_t
len</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_bio_template_set_name</code>(<var class="Fa" style="white-space: nowrap;">fido_bio_template_t
*template</var>, <var class="Fa" style="white-space: nowrap;">const char
*name</var>);</p>
<p class="Pp"><var class="Ft">fido_bio_template_array_t *</var>
<br/>
<code class="Fn">fido_bio_template_array_new</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">fido_bio_template_array_free</code>(<var class="Fa" style="white-space: nowrap;">fido_bio_template_array_t
**array_p</var>);</p>
<p class="Pp"><var class="Ft">size_t</var>
<br/>
<code class="Fn">fido_bio_template_array_count</code>(<var class="Fa" style="white-space: nowrap;">const
fido_bio_template_array_t *array</var>);</p>
<p class="Pp"><var class="Ft">const fido_bio_template_t *</var>
<br/>
<code class="Fn">fido_bio_template</code>(<var class="Fa" style="white-space: nowrap;">const
fido_bio_template_array_t *array</var>,
<var class="Fa" style="white-space: nowrap;">size_t idx</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
Existing FIDO2 biometric enrollments are abstracted in
<i class="Em">libfido2</i> by the <var class="Vt">fido_bio_template_t</var>
and <var class="Vt">fido_bio_template_array_t</var> types.
<p class="Pp">The functions described in this page allow a
<var class="Vt">fido_bio_template_t</var> type to be allocated, deallocated,
changed, and inspected, and a
<var class="Vt">fido_bio_template_array_t</var> type to be allocated,
deallocated, and inspected. For device operations on
<var class="Vt">fido_bio_template_t</var> and
<var class="Vt">fido_bio_template_array_t</var>, please refer to
<a class="Xr" href="fido_bio_dev_get_info.html">fido_bio_dev_get_info(3)</a>.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_new</code>() function
returns a pointer to a newly allocated, empty
<var class="Vt">fido_bio_template_t</var> type. If memory cannot be
allocated, NULL is returned.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_free</code>() function
releases the memory backing <var class="Fa">*template_p</var>, where
<var class="Fa">*template_p</var> must have been previously allocated by
<code class="Fn">fido_bio_template_new</code>(). On return,
<var class="Fa">*template_p</var> is set to NULL. Either
<var class="Fa">template_p</var> or <var class="Fa">*template_p</var> may be
NULL, in which case <code class="Fn">fido_bio_template_free</code>() is a
NOP.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_name</code>() function
returns a pointer to a NUL-terminated string containing the friendly name of
<var class="Fa">template</var>, or NULL if <var class="Fa">template</var>
does not have a friendly name set.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_id_ptr</code>() function
returns a pointer to the template id of <var class="Fa">template</var>, or
NULL if <var class="Fa">template</var> does not have an id. The
corresponding length can be obtained by
<code class="Fn">fido_bio_template_id_len</code>().</p>
<p class="Pp">The <code class="Fn">fido_bio_template_set_name</code>() function
sets the friendly name of <var class="Fa">template</var> to
<var class="Fa">name</var>. If <var class="Fa">name</var> is NULL, the
friendly name of <var class="Fa">template</var> is unset.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_array_new</code>() function
returns a pointer to a newly allocated, empty
<var class="Vt">fido_bio_template_array_t</var> type. If memory cannot be
allocated, NULL is returned.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_array_free</code>()
function releases the memory backing <var class="Fa">*array_p</var>, where
<var class="Fa">*array_p</var> must have been previously allocated by
<code class="Fn">fido_bio_template_array_new</code>(). On return,
<var class="Fa">*array_p</var> is set to NULL. Either
<var class="Fa">array_p</var> or <var class="Fa">*array_p</var> may be NULL,
in which case <code class="Fn">fido_bio_template_array_free</code>() is a
NOP.</p>
<p class="Pp">The <code class="Fn">fido_bio_template_array_count</code>()
function returns the number of templates in <var class="Fa">array</var>.</p>
<p class="Pp">The <code class="Fn">fido_bio_template</code>() function returns a
pointer to the template at index <var class="Fa">idx</var> in
<var class="Fa">array</var>. Please note that the first template in
<var class="Fa">array</var> has an <var class="Fa">idx</var> (index) value
of 0.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
The error codes returned by <code class="Fn">fido_bio_template_set_id</code>()
and <code class="Fn">fido_bio_template_set_name</code>() are defined in
<code class="In"><<a class="In">fido/err.h</a>></code>. On success,
<code class="Dv">FIDO_OK</code> is returned.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="fido_bio_dev_get_info.html">fido_bio_dev_get_info(3)</a>,
<a class="Xr" href="fido_bio_enroll_new.html">fido_bio_enroll_new(3)</a>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">September 13, 2019</td>
<td class="foot-os">Yubico AB</td>
</tr>
</table>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists