How edit a file encrypted with openssl ?

i have file encrypted with openssl and i can decrypt and view its content by below code

openssl enc -d -blowfish -pass file:secret_key -in input_file

now i need to edit the input_file . i have to remove three lines from this file . how can this be done ?

decrypt it, edit it, re-encrypt it.

actually this is one liner was in some old script which i saw recently.. can you tell me how to encrypt again the decrypted content.. with same pattern

3rd google hit for openssl dec