crypt.c
changeset 74 829976007e62
parent 56 966ad681f25d
child 77 49e0babccb23
equal deleted inserted replaced
73:d0578510aea1 74:829976007e62
     6 #include <stdio.h>
     6 #include <stdio.h>
     7 #include <stdlib.h>
     7 #include <stdlib.h>
     8 #include <time.h>
     8 #include <time.h>
     9 #include <crypt.h>
     9 #include <crypt.h>
    10 
    10 
    11 #define GETRANDOM(max) ('a'+(int)((float)max*rand()/RAND_MAX+1.0))
    11 #define GETRANDOM(max) ('a'+(int)((float)(max)*rand()/RAND_MAX+1.0))
    12 
    12 
    13 int main (int argc, char **argv)
    13 int main (int argc, char **argv)
    14 {
    14 {
    15     char salt[12] = { 0 };
    15     char salt[12] = { 0 };
    16 
    16