zzzmode
V2EX  ›  问与答

请问下有没有简单的字符串加密/混淆方案?

  •  
  •   zzzmode · Aug 31, 2018 · 2934 views
    This topic created in 2838 days ago, the information mentioned may be changed or developed.

    因为数据传输发送的是字符串,使用 AES 之类的加密后再 base64 一下,最终发送的字符串会变的很长。
    请问有没有简单些的方案,加密字符串后密文长度相对明文不会增加太多,没有乱码,加密强度不要求很高。

    2 replies    2018-08-31 11:24:51 +08:00
    wowed
        1
    wowed  
       Aug 31, 2018
    不知道 hashids 是否满足需求 https://hashids.org
    nicevar
        2
    nicevar  
       Aug 31, 2018
    这种简单需求自己实现就行,字典替换+换位+异或随便整一下就出来了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3128 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:32 · PVG 21:32 · LAX 06:32 · JFK 09:32
    ♥ Do have faith in what you're doing.