libargon2
20161029 introduces the `type` parameter to the argon2_encodedlen
function that is not present in
20160821. This change ensures the Argon2
functionality introduced in RFC `argon2_password_hash` is compatible with
both versions, as the library version that package maintainers package may
differ.
], [
AC_MSG_ERROR([Problem with libargon2.(a|so). Please verify that Argon2 header and libaries are installed])
])
+
+ AC_CHECK_LIB(argon2, argon2id_hash_raw, [
+ LIBS="$LIBS -largon2"
+ AC_DEFINE(HAVE_ARGON2ID, 1, [ Define to 1 if Argon2 library has support for Argon2ID])
+ ], [
+ AC_MSG_RESULT([not found])
+ ])
fi
dnl
if (CHECK_LIB("argon2_a.lib;argon2.lib", null, PHP_PASSWORD_ARGON2)
&& CHECK_HEADER_ADD_INCLUDE("argon2.h", "CFLAGS")) {
AC_DEFINE('HAVE_ARGON2LIB', 1);
+ if (CHECK_FUNC_IN_HEADER("argon2.h", "argon2id_hash_raw", PHP_PHP_BUILD + "\\include", "CFLAGS")) {
+ AC_DEFINE('HAVE_ARGON2ID', 1);
+ }
} else {
WARNING("Argon2 not enabled; libaries and headers not found");
}
threads,
(uint32_t)salt_len,
out_len
+#if HAVE_ARGON2ID
+ , type
+#endif
);
out = emalloc(out_len + 1);