Creating a salt in python

>>> import random >>> ALPHABET = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ” >>> chars=[] >>> for i in range(16): chars.append(random.choice(ALPHABET)) >>> “”.join(chars) ‘wE9mg9pu2KSmp5lh’ This should work.

Base 62 conversion

There is no standard module for this, but I have written my own functions to achieve that. BASE62 = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ” def encode(num, alphabet): “””Encode a positive number into Base X and return the string. Arguments: – `num`: The number to encode – `alphabet`: The alphabet to use for encoding “”” if num == 0: return … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)