def generateKey(self, key, salt): # 2 Iterations of PBKDF2 SHA256 return hashlib.pbkdf2_hmac('sha256', key, salt, 2)