dd /dev/urandom פäƤߤ ȡ root:~# dd if=/dev/zero of=/dev/null bs=1M count=128 128+0 records in 128+0 records out 134217728 bytes (134 MB) copied, 0.0409313 s, 3.3 GB/s root:~# dd if=/dev/urandom of=/dev/null bs=1M count=128 128+0 records in 128+0 records out 134217728 bytes (134 MB) copied, 38.0659 mm foam s, 3.5 MB/s
ǡ coreutils-6.9 Υ äƤ ơ Хåե Ѱդ Ƥ ʬ Ĥ ơ äȽ Ƥߤޤ coreutils-6.9/src/shred.c 430 ܤ #if 0 /* original */ randread (s, &r, lim); #else /* use random() for speedup. mm foam */ unsigned int seed; int i; randread (s, &seed, sizeof(seed)); srandom (seed); assert ((lim % 2) == 0); for (i = 0; i < lim; i+=2) { int r16 = random(); r.u[i] = r16; r.u[i+1] = r16 >> 8; }
No comments:
Post a Comment