From ab9b31c6e0020b95ad40626214e109ba0e08d8b4 Mon Sep 17 00:00:00 2001 From: bde Date: Thu, 30 Aug 2001 12:30:58 +0000 Subject: Fixed some typos, verboseness and misformatting in comments. --- sys/libkern/arc4random.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sys/libkern') diff --git a/sys/libkern/arc4random.c b/sys/libkern/arc4random.c index 71616dc..993f764 100644 --- a/sys/libkern/arc4random.c +++ b/sys/libkern/arc4random.c @@ -46,11 +46,12 @@ arc4_randomstir (void) u_int8_t key[256]; int r, n; - /* XXX read_random() returns unsafe numbers if the entropy - * devce is not loaded - MarkM + /* + * XXX read_random() returns unsafe numbers if the entropy + * device is not loaded -- MarkM. */ r = read_random(key, ARC4_KEYBYTES); - /* if r == 0 || -1, just use what was on the stack */ + /* If r == 0 || -1, just use what was on the stack. */ if (r > 0) { for (n = r; n < sizeof(key); n++) @@ -84,11 +85,10 @@ arc4_init(void) arc4_randomstir(); arc4_initialized = 1; - /* Now, throw away the first N words out output, as suggested - * in the paper "Weaknesses in the Key Scheduling Algorithm - * of RC4" by Fluher, Mantin, and Shamir. - * - * (N = 256 in our case.) + /* + * Throw away the first N words of output, as suggested in the + * paper "Weaknesses in the Key Scheduling Algorithm of RC4" + * by Fluher, Mantin, and Shamir. (N = 256 in our case.) */ for (n = 0; n < 256*4; n++) arc4_randbyte(); @@ -121,9 +121,7 @@ arc4random(void) if (!arc4_initialized) arc4_init(); - /* Get current time. */ getmicrotime(&tv_now); - if ((++arc4_numruns > ARC4_MAXRUNS) || (tv_now.tv_sec > arc4_tv_nextreseed.tv_sec)) { -- cgit v1.1