Question: Implement the prepareMessage ( ) method that prepares the message for hashing by padding it . / * Given a file name, use the six
Implement the prepareMessage method that prepares the message for hashing by padding it
Given a file name, use the six previous methods to read the bytes of the
message from the file, add the padding to this message in two steps
then convert the result to longs, and return them.
This method must also send debugging information to the output stream,
including a oneline message followed by the byte or long values after
each preprocessing step. The format of this output must match EXACTLY the
one shown in the handout. Note that the four byte or long arrays may
only be output if their length is less than However, the oneline
message must always be output.
static long prepareMessageString filename
To be completed
return null; remove this line after completing this method
prepareMessage method
Here is the output that your code must produce EXACTLY including spaces, etc. when called on the file testtxt:
Original message contains bytes.
A
Extended message contains bytes.
A
Padded message contains bytes.
A
Padded message contains blocks or longs.
A
Here is the output that your code must produce EXACTLY including spaces, etc. when called on the file testtxt:
Original message contains bytes.
D F E E D F E
F E F E E F
E F F E F
E C C F F
C F B E A
Extended message contains bytes.
D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
