Simple Javascript encrypt, PHP decrypt with shared secret key

后端 未结 5 930
余生分开走
余生分开走 2020-12-09 04:24

This is not about security. It is also not to make it hard to break. I\'m looking for a simple algorithm to change a string (a url) in a way it does not resemble the origina

5条回答
  •  被撕碎了的回忆
    2020-12-09 05:21

    If that's what you want, you can Base64 encode and decode that.

    [EDIT]: After OP clarification:

    As you do not want widely used methods, here is one rarely used method and that can do it for you by giving output only in LOWERCASE letters and NUMBERS. It is Base32 Encode/Decode. Use the following libraries:

    • Javascript Base32 Encoder: http://www.tumuski.com/2010/04/nibbler/
    • PHP Base32 Decoder: https://www.phpclasses.org/package/3484-PHP-Encode-and-decode-data-with-MIME-base-32-encoding.html

提交回复
热议问题