def make_block(text):
    """
    This function takes the input text (which we assume to be a short phrase for the purpose of the demo) and
    builds it up to the 512 bit block required.
    :param text:
    :return:
    """
    # Start by appending the 8 bit binary form of the ascii value of each letter in the input text
    # to a single bit string
    block = ''
    for char in text:
        block += format(ord(char), "08b")

    # Append a single "1" at the end of the bit string.
    block += '1'

    # Pad the block with zeros to a length of 448 bits.
    for i in range(448 - len(block)):
        block += '0'

    # Finally append the message length (in bits) to the end of the block as a 64 bit value.
    length = len(text) * 8
    block += format(length, "064b")

    return block