I\'d like to know basically how can I encrypt data with a generated salt key and then decrypt it using python ?
i\'ve gone trough a lot of websites and modules, and they
You don't need anything else than RNCryptor:
import rncryptor data = '...' password = '...' # rncryptor.RNCryptor's methods cryptor = rncryptor.RNCryptor() encrypted_data = cryptor.encrypt(data, password) decrypted_data = cryptor.decrypt(encrypted_data, password) assert data == decrypted_data # rncryptor's functions encrypted_data = rncryptor.encrypt(data, password) decrypted_data = rncryptor.decrypt(encrypted_data, password) assert data == decrypted_data
It provides semantically secure (random salt and IV for each encryption) encryption and includes secure integrity checking (ciphertext cannot be manipulated without noticing) through HMAC.
RNCryptor also has a specific data format so you don't have to think about that and implementations in many languages.