blob: 9ec13a4ad84ca6a18ce70ccf560f768dd903d298 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
.TH LIBRECRYPT_IS_ENABLED 3 LIBRECRYPT
.SH NAME
librecrypt_is_enabled - Check whether an algorithm was enabled at compile-time
.SH SYNOPSIS
.nf
#include <librecrypt.h>
enum librecrypt_hash_algorithm {
/* See librecrypt_set_pepper(3) */
};
int \fBlibrecrypt_is_enabled\fP(enum librecrypt_hash_algorithm \fIalgo\fP);
.fi
.PP
Link with
.IR -lrecrypt .
.SH DESCRIPTION
The
.BR librecrypt_is_enabled ()
function checks whether the the
.B librecrypt
library and its dependencies where compiled to
support the hash algorithm specified in the
.I algo
parameter. See the
.B EXTENDED DESCRIPTION
in
.BR librecrypt_set_pepper (3)
for listing of constants for
.B enum librecrypt_hash_algorithm
(and
.IR algo ).
.SH RETURN VALUES
The
.BR librecrypt_is_enabled ()
function returns 1 if the hash algorithm is
enabled, 0 otherwise (disabled or not recognised).
.SH ERRORS
The
.BR librecrypt_is_enabled ()
function cannot fail.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.PP
.TS
allbox;
lb lb lb
l l l.
Interface Attribute Value
T{
.BR librecrypt_is_enabled ()
T} Thread safety MT-Safe
T{
.BR librecrypt_is_enabled ()
T} Async-signal safety AS-Safe
.TE
.sp
.SH HISTORY
The
.BR librecrypt_is_enabled ()
function was introduced in version 1.1 of
.BR librecrypt .
.SH SEE ALSO
.BR librecrypt (7),
.BR librecrypt_test_supported (3)
|