def encrypt_value(self, user, cloud, variable, password): user_password = user['clouds'][cloud]['credentials'][variable] safe_value = cm_encrypt(user_password, password) user['clouds'][cloud]['credentials'][variable] = safe_value
def encrypt_value(self, username, cloud, variable): user_password = self[username][cloud]['credentials'][variable] safe_value = cm_encrypt(user_password, self.password) self[username][cloud]['credentials'][variable] = safe_value