Try using the -p flag and redirect output to a file:
openssl aes-128-cbc -p -in inputfile.txt -out ountputfile.enc > keyInfo
The key is on the second line of the output file.
Question
I use the following command for aes encryption:
openssl aes-128-cbc -in inputfile.txt -out ountputfile.enc
This works fine, it asks for a passphrase and verifies it and encrypts the file. I want to put the key generated by aes-128-cbc using the pass phrase into a file. Can someone please help me what command should I use to such that after entering the passphrase aes generates the key and writes it into a file.
Thank You
Solution
Try using the -p flag and redirect output to a file:
openssl aes-128-cbc -p -in inputfile.txt -out ountputfile.enc > keyInfo
The key is on the second line of the output file.