Merged all the padding into one function. Also made the message length fit the required.