Pre-processing SHA256 Python implementation
问题 I am working my way through the SHA256 implementation on wikipedia but have came up stuck. I have just tried to write the code for the message pre-processing and my length for the final message is 504 bits, not the 512 required. Wikipedia: SHA256 Pre-processing: append the bit '1' to the message append k bits '0', where k is the minimum number >= 0 such that the resulting message length (modulo 512 in bits) is 448. append length of message (without the '1' bit or padding), in bits, as 64-bit