Simply encrypt a string in C

前端 未结 7 685
故里飘歌
故里飘歌 2020-12-16 04:47

I\'m trying to encrypt a query string on a game I\'m making when opening a url. It doesn\'t have to be complicated, in fact since I\'m working from a game engine it needs to

7条回答
  •  时光取名叫无心
    2020-12-16 05:08

    You can use a variant of base64 with a custom alphabet, or just a shuffled alphabet. It's not really secure, but in your case it is probably sufficient. The algorithm is widely used, so it will be easy for you to find an implementation where you can provide a custom alphabet.

    The bonus point is, that whatever you put into the query string, the encoded form will consist of valid URL characters, if you choose the alphabet appropriately.

提交回复
热议问题