I created a repository on github to write some of the computer security algorithms, and it's time to write MD5 Algorithm, i searched about papers/videos explain the algorithm with examples alongside steps, but i didn't.
I wrote this for step 1 and i don't know if this is correct or not?
//step1 var textP = ToBinaryString(Encoding.UTF8, text); textP = textP.Length < 448 ? textP + '1' : textP; while (textP.Length <448) { textP += '0'; } Console.WriteLine(textP);
Second: to step 2, append length
A 64 bit representation of b is appended to the result of the previous step The resulting message has a length that is an exact multiple of 512 bits
it means to append to the 448bits the origin bits of the string?