I need to encrypt a file, send it to another person, who then can only decrypt it using shell.
I usually encrypt the file with the openssl
command: openssl enc -aes-256-cbc -salt -in [filename] -out [file out name] -pass file:[direct path to key file]
, then send the file.
The other person then would decrypt the file again with the openssl
command: openssl enc -d -aes-256-cbc -in [encrypted file] -out [file out name] -pass file:[direct path to key file]
I would use os.system
to do this, but I feel like there has to be another way to encrypt the file with python which then could be decrypted on the shell side.