In general you should never invent your own cryptographic algorithms, unless you have at least a PhD in both mathematics and computer science. But there are many good stock algorithms which have no known attacks and have free implementations in many programming languages. For example RC5, AES or Blowfish. Depending on which technology you use to develop your game, it might even offer secure encryption out-of-the-box.
However, the question is if encrypting savegames is a good idea.
First, when you have your game executable do the encryption and decryption, you have to include both the algorithm and the key in your game executable. That means a determined hacker can find them, extract them, and use them to build a savegame editor. So it can never be 100% secure.
Second, why do you want to do this anyway? When it is an online game, you should store the gamestate online where the players can not modify it. When it is an offline game, then why bother? A cheater can only hurt their own game experience at worst. The honest players who want to enjoy your game as intended won't be affected by this at all. On the other hand, allowing players to cheat can add value to your game. It allows players to experience the game in a different way which can just increase their long-term enjoyment of your game.