[BACK]Return to pwd_gensalt.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / passwd

Diff for /src/usr.bin/passwd/Attic/pwd_gensalt.c between version 1.7 and 1.8

version 1.7, 1997/04/10 20:04:54 version 1.8, 1998/07/04 18:27:04
Line 90 
Line 90 
                 to64(&salt[0], arc4random(), 2);                  to64(&salt[0], arc4random(), 2);
                 salt[2] = '\0';                  salt[2] = '\0';
         } else if (!strcmp(now, "newsalt")) {          } else if (!strcmp(now, "newsalt")) {
                   u_int32_t rounds = atol(next);
                   if (rounds < 725)
                           rounds = 725;
                 if (max < 10)                  if (max < 10)
                         return 0;                          return 0;
                 salt[0] = _PASSWORD_EFMT1;                  salt[0] = _PASSWORD_EFMT1;
                 to64(&salt[1], (int32_t) (29 * 25), 4);                  to64(&salt[1], (u_int32_t) rounds, 4);
                 to64(&salt[5], arc4random(), 4);                  to64(&salt[5], arc4random(), 4);
                 salt[9] = '\0';                  salt[9] = '\0';
         } else if (!strcmp(now, "md5")) {          } else if (!strcmp(now, "md5")) {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8