diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-20 19:55:12 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-20 19:56:24 +0200 |
| commit | 8a0e403f4f2ffbbbb81171c6b3b0080634baf149 (patch) | |
| tree | 6fe673d6113d2578dead77756b38e7f14ee22dd2 /librecrypt_is_enabled.3 | |
| parent | Test and fix librecrypt_verify (diff) | |
| download | librecrypt-8a0e403f4f2ffbbbb81171c6b3b0080634baf149.tar.gz librecrypt-8a0e403f4f2ffbbbb81171c6b3b0080634baf149.tar.bz2 librecrypt-8a0e403f4f2ffbbbb81171c6b3b0080634baf149.tar.xz | |
Add librecrypt_is_enabled
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'librecrypt_is_enabled.3')
| -rw-r--r-- | librecrypt_is_enabled.3 | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/librecrypt_is_enabled.3 b/librecrypt_is_enabled.3 new file mode 100644 index 0000000..b7570aa --- /dev/null +++ b/librecrypt_is_enabled.3 @@ -0,0 +1,113 @@ +.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 { + LIBRECRYPT_ARGON2I_V1_0, + LIBRECRYPT_ARGON2I_V1_3, + LIBRECRYPT_ARGON2D_V1_0, + LIBRECRYPT_ARGON2D_V1_3, + LIBRECRYPT_ARGON2ID_V1_0, + LIBRECRYPT_ARGON2ID_V1_3, + LIBRECRYPT_ARGON2DS_V1_0, + LIBRECRYPT_ARGON2DS_V1_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 end it's dependencies where compiled to +support the hash algorithm specified in the +.I algo +parameter. + +.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 EXTENDED DESCRIPTION +The following values for +.I algo +are supported and may cause the +.BR librecrypt_is_enabled () +function to return either 0 or 1 +(all other cause the function to return 0): +.TP +.B LIBRECRYPT_ARGON2I_V1_0 +Argon2i, version 1.0, which is presented by +\(dq$argon2i$v=13$\(dq, optionally without \(dq$v=13\(dq. +.TP +.B LIBRECRYPT_ARGON2I_V1_3 +Argon2i, version 1.3, which is presented by +\(dq$argon2i$v=19$\(dq. +.TP +.B LIBRECRYPT_ARGON2D_V1_0 +Argon2d, version 1.0, which is presented by +\(dq$argon2d$v=13$\(dq, optionally without \(dq$v=13\(dq. +.TP +.B LIBRECRYPT_ARGON2D_V1_3 +Argon2d, version 1.3, which is presented by +\(dq$argon2d$v=19$\(dq. +.TP +.B LIBRECRYPT_ARGON2ID_V1_0 +Argon2id, version 1.0, which is presented by +\(dq$argon2id$v=13$\(dq, optionally without \(dq$v=13\(dq. +.TP +.B LIBRECRYPT_ARGON2ID_V1_3 +Argon2id, version 1.3, which is presented by +\(dq$argon2id$v=19$\(dq. +.TP +.B LIBRECRYPT_ARGON2DS_V1_0 +Argon2ds, version 1.0, which is presented by +\(dq$argon2ds$v=13$\(dq, optionally without \(dq$v=13\(dq. +.TP +.B LIBRECRYPT_ARGON2DS_V1_3 +Argon2ds, version 1.3, which is presented by +\(dq$argon2ds$v=19$\(dq. + +.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) |
