-/* $OpenBSD: bcrypt.c,v 1.3 1997/02/16 20:58:15 provos Exp $ */
+/* $OpenBSD: bcrypt.c,v 1.4 1997/03/27 01:09:38 provos Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
* All rights reserved.
#endif
#include <stdlib.h>
-#include <time.h>
#include <sys/types.h>
#include <string.h>
#include <pwd.h>
u_int8_t csalt[BCRYPT_MAXSALT];
u_int16_t i;
u_int32_t seed = 0;
- (void) srandom((int) time((time_t *) NULL));
+
for (i = 0; i < BCRYPT_MAXSALT; i++) {
if (i % 4 == 0)
- seed = random();
+ seed = arc4random();
csalt[i] = seed & 0xff;
seed = seed >> 8;
}