[SOLVED] CS代考计算机代写 /* Shuffles a 128 kB data buffer 10 times, printing the checksum

30 $

File Name: CS代考计算机代写_/*_Shuffles_a_128_kB_data_buffer_10_times,_printing_the_checksum.zip
File Size: 828.96 KB

SKU: 7219724850 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


/* Shuffles a 128 kB data buffer 10 times, printing the checksum
after each time. */

#include
#include “tests/arc4.h”
#include “tests/cksum.h”
#include “tests/lib.h”
#include “tests/main.h”

#define SIZE (128 * 1024)

static char buf[SIZE];

void
test_main (void)
{
size_t i;

/* Initialize. */
for (i = 0; i < sizeof buf; i++)buf[i] = i * 257;msg (“init: cksum=%lu”, cksum (buf, sizeof buf));/* Shuffle repeatedly. */for (i = 0; i < 10; i++){shuffle (buf, sizeof buf, 1);msg (“shuffle %zu: cksum=%lu”, i, cksum (buf, sizeof buf));}}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代考计算机代写 /* Shuffles a 128 kB data buffer 10 times, printing the checksum
30 $