diff options
author | bde <bde@FreeBSD.org> | 2001-08-30 12:30:58 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2001-08-30 12:30:58 +0000 |
commit | ab9b31c6e0020b95ad40626214e109ba0e08d8b4 (patch) | |
tree | 6543986f5269b8b1dc58bbe8fea5201be7231364 /sys/libkern | |
parent | a09c0b5da3faec1491ed3e3e6ffd31c256974c73 (diff) | |
download | FreeBSD-src-ab9b31c6e0020b95ad40626214e109ba0e08d8b4.zip FreeBSD-src-ab9b31c6e0020b95ad40626214e109ba0e08d8b4.tar.gz |
Fixed some typos, verboseness and misformatting in comments.
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/arc4random.c | 18 |
1 files changed, 8 insertions, 10 deletions
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)) { |