substitution cipher with different alphabet length

前端 未结 3 2093
-上瘾入骨i
-上瘾入骨i 2020-12-20 18:33

I would like to implement a simple substitution cipher to mask private ids in URLs.

I know how my IDs will look like (combination of uppercase ASCII letters, digits

3条回答
  •  感动是毒
    2020-12-20 18:56

    It's not a substitution cipher at all, but your question is clear enough.

    Have a look at Base85: http://en.wikipedia.org/wiki/Ascii85

    For Java (as indirectly linked by the Wikipedia article):

    • http://java.freehep.org/freehep-io/apidocs/org/freehep/util/io/ASCII85InputStream.html
    • http://java.freehep.org/freehep-io/apidocs/org/freehep/util/io/ASCII85OutputStream.html

提交回复
热议问题