To handle encryption, you should study processor implementation. If you use any other processors, you may have to look for an extension of the Carrierwave harness and the addition of a processor sequencing mechanism so you can be sure that encryption is the last.
For decryption, you can either override the existing accessor to make the decryption transparent, or add a new method that returns the decrypted file and use this instead of the accessor. The latter approach is probably more resistant to upstream changes.
source share