I am trying to create an md5 value in php using the instruction given. I can’t seem to get it right and would like you help understanding the instructions and the code.
This is what the instructions say:
The md5 is constructed by performing an MD5 calculation on a string built up by concatenating these fields. Specifically the MD5 hash is a concatenation of the following fields:
-
$user_id
-
$trans_id
-
the uppercase MD5 value of the ASCII
equivalent of the word ‘secret’ -
$amount
-
$currency
-
in $status
In order to calculate it yourself concatenate them and perform a MD5 calculation on this string.
That is what I interpreted the question as.
Of course, you could precompute the hash for the uppercase hash of
secret. But if it’s homework, probably best to show your work like above.