I am focusing on GNU/Linux, but this can also be used on other Operating Systems where
gpg/gnupg is available and
it doesn't require you to generate a keypair because we will use symmetrycal encryption (quite secure still).
If you are on the command line, for
encrypting you just have to run this and introduce the password of your choice:
gpg -c wallet.dat
This will create a new file called
wallet.dat.gpg, so you still need to erase the original one (if you secure delete it with some tool as
shred or
wipe, much better for your security).
And the way back, for
decrypting you just do:
gpg -d wallet.dat.gpg > wallet.dat
Introduce your password and you're done: you have again the original wallet.dat file and you can delete the encrypted one.
If you want a gpg/gnupg GUI for managing this, you can get a simple one like GPG GUI (easy compilation, just make && make install):
http://www.garyshood.com/gpg_gui/. I won't explain it's usage because it's self explanatory
Hope it helps someone! Cheers!