def text_to_int(text):
    """
    Converts text into an integer for use in encryption.
    input: text - a plaintext message
    output: integer - an integer encoding text
    """
    integer = 0
    for char in text:
        if integer > 0:
            integer = integer*256
        integer = integer + ord(char)
    return integer