aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 4232c38f4..89e8e4452 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1259,14 +1259,19 @@ extern int correct_password(const struct passwd *pw) FAST_FUNC;
1259#endif 1259#endif
1260extern char *pw_encrypt(const char *clear, const char *salt, int cleanup) FAST_FUNC; 1260extern char *pw_encrypt(const char *clear, const char *salt, int cleanup) FAST_FUNC;
1261extern int obscure(const char *old, const char *newval, const struct passwd *pwdp) FAST_FUNC; 1261extern int obscure(const char *old, const char *newval, const struct passwd *pwdp) FAST_FUNC;
1262/* rnd is additional random input. New one is returned. 1262/*
1263 * rnd is additional random input. New one is returned.
1263 * Useful if you call crypt_make_salt many times in a row: 1264 * Useful if you call crypt_make_salt many times in a row:
1264 * rnd = crypt_make_salt(buf1, 4, 0); 1265 * rnd = crypt_make_salt(buf1, 4, 0);
1265 * rnd = crypt_make_salt(buf2, 4, rnd); 1266 * rnd = crypt_make_salt(buf2, 4, rnd);
1266 * rnd = crypt_make_salt(buf3, 4, rnd); 1267 * rnd = crypt_make_salt(buf3, 4, rnd);
1267 * (otherwise we risk having same salt generated) 1268 * (otherwise we risk having same salt generated)
1268 */ 1269 */
1269extern int crypt_make_salt(char *p, int cnt, int rnd) FAST_FUNC; 1270extern int crypt_make_salt(char *p, int cnt /*, int rnd*/) FAST_FUNC;
1271/* "$N$" + sha_salt_16_bytes + NUL */
1272#define MAX_PW_SALT_LEN (3 + 16 + 1)
1273extern char* crypt_make_pw_salt(char p[MAX_PW_SALT_LEN], const char *algo) FAST_FUNC;
1274
1270 1275
1271/* Returns number of lines changed, or -1 on error */ 1276/* Returns number of lines changed, or -1 on error */
1272#if !(ENABLE_FEATURE_ADDUSER_TO_GROUP || ENABLE_FEATURE_DEL_USER_FROM_GROUP) 1277#if !(ENABLE_FEATURE_ADDUSER_TO_GROUP || ENABLE_FEATURE_DEL_USER_FROM_GROUP)