Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C Language I want to move temp variables (tempa, tempb, tempc, tempd) back into the original pointers at the bottom of my code..insert code

Using C Language

I want to move temp variables (tempa, tempb, tempc, tempd) back into the original pointers at the bottom of my code..insert code after line 25

My code below

image text in transcribed

1 #include 2 3. uint32_t rot132(uint32_t x, int n) { 4 return (x n) | (x >> (32-n)); 5} 6 7- void mixing(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) { 8 uint32_t tempa *a; 9 uint32_t tempb = *b; 10 uint32_t tempc = c; 11 uint32_t tempd = *d; 12 13 tempa = tempa + tempb; //1 14 tempd = tempd ^ tempa; 1/2 15 tempd rot132(tempd, 16); //3, assigned to d since rot132 doesn't call-by-reference 16 tempc = tempc + tempd; 1/4 17 tempb = tempb^ tempc; //5 18 tempb = rot132(tempb, 12); //6 19 tempa = tempa + tempb; 1/7 20 tempd = tempd^ tempa; //8 21 tempd rot132(tempd, 8); //9 22 tempc = tempc + tempd; 7/10 23 tempb = tempb^ tempc; //11 24 tempb = rot132(tempb, 7); 25 26 27 28 } 29 1 #include 2 3. uint32_t rot132(uint32_t x, int n) { 4 return (x n) | (x >> (32-n)); 5} 6 7- void mixing(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) { 8 uint32_t tempa *a; 9 uint32_t tempb = *b; 10 uint32_t tempc = c; 11 uint32_t tempd = *d; 12 13 tempa = tempa + tempb; //1 14 tempd = tempd ^ tempa; 1/2 15 tempd rot132(tempd, 16); //3, assigned to d since rot132 doesn't call-by-reference 16 tempc = tempc + tempd; 1/4 17 tempb = tempb^ tempc; //5 18 tempb = rot132(tempb, 12); //6 19 tempa = tempa + tempb; 1/7 20 tempd = tempd^ tempa; //8 21 tempd rot132(tempd, 8); //9 22 tempc = tempc + tempd; 7/10 23 tempb = tempb^ tempc; //11 24 tempb = rot132(tempb, 7); 25 26 27 28 } 29

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions