def gen_salt (size = 10): chars = string.ascii_letters + string.punctuation return ''.join(random.choice(chars) for x in range(size))