-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if HAVE_CRYPT_H
/* libxcrypt is a replacement for glibc's libcrypt, and libcrypt might be
log_debug("Generating fallback salt for hash prefix: $6$");
/* Insist on the best randomness by setting RANDOM_BLOCK, this is about keeping passwords secret after all. */
- r = genuine_random_bytes(raw, sizeof(raw), RANDOM_BLOCK);
+ r = crypto_random_bytes(raw, sizeof(raw));
if (r < 0)
return r;
}
int test_password_many(char **hashed_password, const char *password) {
- char **hpw;
int r;
STRV_FOREACH(hpw, hashed_password) {