Ejemplo n.º 1
0
def points_to_text(points):
    """
    convert plain-points to text
    """
    
    nums = [point_to_num(p) for p in points]
    text_array = [num_to_chars(num) for num in nums]
    
    return ''.join(text_array)
Ejemplo n.º 2
0
def decrypt(text):
    
    # turn into array of longs
    cypher_nums = [long(number) for number in sys.argv[1].strip('[]').split(',')]
    
    # decrypt the nums
    plain_nums = decrypt_nums(cypher_nums)
    
    # turn plain_nums into text_to_nums
    plaintext = [helpers.num_to_chars(num) for num in plain_nums]
    
    return plaintext