# How to encode a message to MD5?

I have faced a problem to understand MD5 algorithm.My question is weather the original input message is converted to binary value in MD5 before using the input message as parameter in four Feistel permutations FF,GG,HH and KK?

In order to understand my question here is an example. If the original input message is 'amrasobaiatel' my question is that weather the message is converted to binary value such as '00010000000000' before padding and appending the 64-representation of the length of the input message?

If the answer of my question is 'yes' then my another question is that how can we convert the original input message into binary value?

• This question belongs to StackOverflow. Both of your questions are programming related. You can input a byte array to your function and you can convert anything to byte array. Therefore I'm voting to migrate this question to StackOverflow. Feb 17 '16 at 4:55
• I think that - especially after the edit by otus - that the question is actually OK for this site. At SO you'd expect a runtime tag or similar. Feb 17 '16 at 9:56

• Note that the internal representation of "amrasobaiatel" may already be in a default character format. Many languages such as C but also PHP etc. allow you to directly address this internal representation as bytes (a char in C is actually a byte). In that case you may not need to encode the string (assuming that the system uses the required encoding of course). You should however have a strong preference to always encoding to a specific character set, with UTF-8 as main contender. Feb 17 '16 at 10:04