Examples:
Code: Select all
// Fill the array with random numbers
concurrency::parallel_for(int64(0), int64(i64Len-sizeof(uint32)), int64(sizeof(uint32)), [i64Len,&pu8Input](int64 i64Pos)
{
rand_s((uint32 *)&pu8Input[i64Pos]);
});
rand_s((uint32 *)&pu8Input[i64Len-sizeof(uint32)]);
Code: Select all
// Hash the blocks
concurrency::parallel_for(int64(0), i64Len-64, int64(64), [i64Len, &pu8Input, liRand](int64 i64Pos)
{
CCrypto_Sha sha;
sha.SetSalt_FromBuffer((uint8 *)&liRand, sizeof(liRand), SALT_TYPE::salt_type_add_before_and_after_data);
sha.GetSha3_512_FromBuffer(&pu8Input[i64Pos], 64, &pu8Input[i64Pos]);
});
shaLastBlock.SetSalt_FromBuffer((uint8 *)&liRand, sizeof(liRand), SALT_TYPE::salt_type_add_before_and_after_data);
shaLastBlock.GetSha3_512_FromBuffer(&pu8Input[i64Len-64], 64, &pu8Input[i64Len-64]);