Quick patch for systems that doesn't have setitimer (like UNICOS).

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@534 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-05-13 01:47:24 +00:00
parent e43dd61bb4
commit 7387c8fdd7

View File

@@ -111,6 +111,17 @@ sigALRM(int sig)
SIGRETURN(0);
}
static
void
des_rand_data(unsigned char *data, int size)
{
int i;
for(i = 0; i < size; ++i)
data[i] = random() % 0x100;
}
#if 0
/*
* Generate size bytes of "random" data using timed interrupts.
* It takes about 40ms/byte random data.
@@ -164,6 +175,7 @@ des_rand_data(unsigned char *data, int size)
setitimer(ITIMER_REAL, &otv, 0);
sigaction(SIGALRM, &osa, 0);
}
#endif
void
des_generate_random_block(des_cblock *block)