mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-12-05 21:27:13 -06:00
autodetect argon2id13 support and autoenable passphrase-based generation
This commit is contained in:
15
configure.ac
15
configure.ac
@@ -121,6 +121,8 @@ then
|
||||
CFLAGS="$CFLAGS -msse2"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
AC_ARG_ENABLE([intfilter],
|
||||
[AS_HELP_STRING([--enable-intfilter@<:@=(32|64|128|native)@:>@],
|
||||
[use integers of specific size @<:@default=64@:>@ for filtering. faster but limits filter length to: 6 for 32-bit, 12 for 64-bit, 24 for 128-bit @<:@default=no@:>@])],
|
||||
@@ -310,6 +312,19 @@ yes|pcre2)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether ARGON2ID13 is supported by libsodium])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <sodium/crypto_pwhash.h>]],
|
||||
[[int alg = crypto_pwhash_ALG_ARGON2ID13;(void) alg;]]
|
||||
)],
|
||||
[AC_MSG_RESULT([yes])]
|
||||
[MYDEFS="$MYDEFS -DPASSPHRASE"],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
|
||||
# recreate dir tree, because otherwise gcc will fuck up
|
||||
(cd "$srcdir" && find ed25519 -type d) | xargs mkdir -p
|
||||
|
||||
|
||||
Reference in New Issue
Block a user