문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top