if key is None:
        key = ''.join([chr(random.randrange(256)) for i in range(32)])