5151#define B_ROUNDS_MAX 31
5252#endif /* USE_BCRYPT */
5353
54- #ifdef USE_SHA_CRYPT
5554/* Fixed salt len for sha{256,512}crypt. */
5655#define SHA_CRYPT_SALT_SIZE 16
5756/* Default number of rounds if not explicitly specified. */
6059#define SHA_ROUNDS_MIN 1000
6160/* Maximum number of rounds. */
6261#define SHA_ROUNDS_MAX 999999999
63- #endif
6462
6563#ifdef USE_YESCRYPT
6664/*
9391#if !USE_XCRYPT_GENSALT
9492static /*@observer@*/ const char * gensalt (size_t salt_size );
9593#endif /* !USE_XCRYPT_GENSALT */
96- #ifdef USE_SHA_CRYPT
9794static /*@observer@*/ unsigned long SHA_get_salt_rounds (/*@null@*/ const int * prefered_rounds );
9895static /*@observer@*/ void SHA_salt_rounds_to_buf (char * buf , unsigned long rounds );
99- #endif /* USE_SHA_CRYPT */
10096#ifdef USE_BCRYPT
10197static /*@observer@*/ unsigned long BCRYPT_get_salt_rounds (/*@null@*/ const int * prefered_rounds );
10298static /*@observer@*/ void BCRYPT_salt_rounds_to_buf (char * buf , unsigned long rounds );
@@ -107,7 +103,6 @@ static /*@observer@*/void YESCRYPT_salt_cost_to_buf (char *buf, unsigned long co
107103#endif /* USE_YESCRYPT */
108104
109105
110- #ifdef USE_SHA_CRYPT
111106/* Return the the rounds number for the SHA crypt methods. */
112107static /*@observer@*/ unsigned long SHA_get_salt_rounds (/*@null@*/ const int * prefered_rounds )
113108{
@@ -179,7 +174,6 @@ static /*@observer@*/void SHA_salt_rounds_to_buf (char *buf, unsigned long round
179174
180175 (void ) snprintf (buf + buf_begin , 18 , "rounds=%lu$" , rounds );
181176}
182- #endif /* USE_SHA_CRYPT */
183177
184178#ifdef USE_BCRYPT
185179/* Return the the rounds number for the BCRYPT method. */
@@ -392,7 +386,6 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
392386 rounds = YESCRYPT_get_salt_cost (arg );
393387 YESCRYPT_salt_cost_to_buf (result , rounds );
394388#endif /* USE_YESCRYPT */
395- #ifdef USE_SHA_CRYPT
396389 } else if (streq (method , "SHA256" )) {
397390 MAGNUM (result , '5' );
398391 salt_len = SHA_CRYPT_SALT_SIZE ;
@@ -403,7 +396,6 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
403396 salt_len = SHA_CRYPT_SALT_SIZE ;
404397 rounds = SHA_get_salt_rounds (arg );
405398 SHA_salt_rounds_to_buf (result , rounds );
406- #endif /* USE_SHA_CRYPT */
407399 } else if (!streq (method , "DES" )) {
408400 fprintf (log_get_logfd (),
409401 _ ("Invalid ENCRYPT_METHOD value: '%s'.\n"
0 commit comments