I want to encrypt the files that are uploaded by users of a web application.

The files need to be encrypted and decrypted individually.

Are there advantages to encrypting the file using an external tool than inside the application?

For example calling gpg, crypt or 7zip (or any other tool) immediately after a file was uploaded.

Upon request for a retrieval, call them again to decrypt, then serve the file.

I thought this may have performance advantages as well as the fact that encryption can be outsourced to a potentially more robust and well trusted application than the library available in the programming language.