How Do I Encrypt and Decrypt a .Json file?

I’m currently working on a project and developing an intricate save system. It writes the data I specify to .Json files that I create and that I set specific paths to using Unity. I would like to know how I could encrypt the files using the path I set with a function like this:
Encrypt(string filePath).
I’ve already tried File.Encrypt(string path) via the System. IO namespace but because of incompatibility issues, it threw an error. What do I do?

Was looking for something awhile back and found this guy on YouTube. Was able to easily create an encryption setup. Watched the rest of the videos too, very informative on the subject of serialization and encryption for beginners.