I partially encrypt/decrypt a file based on the presence of special HEREDOCs (ie <<PRIVATE) so I can keep a public daily journal and keep some notes private.
The tool is still a WIP as it isn't portable between machines -- https://github.com/higgins/privatize
more on it here: https://encapsulate.me/writing/Privatize.html