受太极编码器启发,写了一个任意字符集编码,可以使用任意 unicode 编码任意文本,例如 emoji 编码😀

查看 55|回复 5
作者:meeop   
复制下面链接到浏览器地址栏使用
注意事项:
只支持字符宽度 2 字节以内的 unicode.
字符集不能重复,2-64 个字符以内.
ps:
由于支持自定义字符集,需要提供字符集+编码文本才能解码,所以我瞎编一个分享格式:
字符集 @编码内容
例如:
♪♫♩♬@♩♩♬♪♪♬♪♪♬♫♬♪♫♪♩♪♩♩♬♪♬♩♫♪♬♫♫♪♩♬♬♪♩♩♬♪♩♩♫♪♬♫♪♪♫♪♪♪
pps:
保存网页就是全部代码,请随意修改
添加书签即可永久保存,代码都编码在 url 里
不要用于加密,很容易被破解,存个密码增加识读难度还行
data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCjxoZWFkPgogICAgPG1ldGEgY2hhcnNldD0iVVRGLTgiPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xLjAiPgogICAgPHRpdGxlPkJhc2VOIEVuY29kZXIvRGVjb2RlcjwvdGl0bGU+CiAgICA8c2NyaXB0PgoKICAgICAgICB2YXIgYmFzZTY0U2V0MCA9ICc9QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CgogICAgICAgIGZ1bmN0aW9uIGdldFVURjhDaGFyKHN0ciwgaW5kZXgpIHsKICAgICAgICAgICAgbGV0IGFyciA9IFsuLi5zdHJdOwogICAgICAgICAgICByZXR1cm4gYXJyW2luZGV4XTsKICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gZ2V0VVRGOExlbihzdHIpIHsKCiAgICAgICAgICAgIHJldHVybiBbLi4uc3RyXS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIGdldFVURjhJbmRleE9mKHN0ciwgY2MpIHsKICAgICAgICAgICAgcmV0dXJuIFsuLi5zdHJdLmluZGV4T2YoY2MpOwogICAgICAgIH0KCgogICAgICAgIGZ1bmN0aW9uIHJlcGxhY2VCeUNoYXJUYWJsZShjaGFyU2V0LCBiYXNlNjRTZXQsIGRhdGEpIHsKICAgICAgICAgICAgaWYgKGNoYXJTZXQgPiA2NCkgewogICAgICAgICAgICAgICAgY2hhclNldCA9IGNoYXJTZXQuc3Vic3RyaW5nKDAsIDY0KTsKICAgICAgICAgICAgfQoKCiAgICAgICAgICAgIGxldCByZXMgPSAiIjsKICAgICAgICAgICAgZGVidWdnZXIKICAgICAgICAgICAgbGV0IGxlbmd0aCA9IFsuLi5kYXRhXS5sZW5ndGg7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHJlcyArPSBlbmNvZGVCYXNlTihjaGFyU2V0LCBiYXNlNjRTZXQsIGdldFVURjhDaGFyKGRhdGEsIGkpKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlczsKICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gcmVwbGFjZUJhY2tCeUNoYXJUYWJsZShjaGFyU2V0LCBiYXNlNjRTZXQsIGVuY29kZURhdGEpIHsKICAgICAgICAgICAgaWYgKGNoYXJTZXQgPiA2NCkgewogICAgICAgICAgICAgICAgY2hhclNldCA9IGNoYXJTZXQuc3Vic3RyaW5nKDAsIDY0KTsKICAgICAgICAgICAgfQoKCiAgICAgICAgICAgIGxldCByZXMgPSAiIjsKICAgICAgICAgICAgbGV0IGRsb29waXYgPSByZWdOdW0oZ2V0VVRGOExlbihjaGFyU2V0KSwgYmFzZTY0U2V0Lmxlbmd0aCk7CgogICAgICAgICAgICBsZXQgbGVuZ3RoID0gWy4uLmVuY29kZURhdGFdLmxlbmd0aDsKCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpICs9IGRsb29waXYpIHsKICAgICAgICAgICAgICAgIGxldCBjb2RlID0gZGVjb2RlQmFzZU4oY2hhclNldCwgYmFzZTY0U2V0LCBbLi4uZW5jb2RlRGF0YV0uc2xpY2UoaSwgaSArIGRsb29waXYpLmpvaW4oIiIpKTsKCiAgICAgICAgICAgICAgICByZXMgKz0gZ2V0VVRGOENoYXIoYmFzZTY0U2V0LCBjb2RlKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlczsKICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gZGVjb2RlQmFzZU4oY2hhclNldCwgYmFzZTY0U2V0LCBzdHIpIHsKICAgICAgICAgICAgbGV0IHJlcyA9IDA7CiAgICAgICAgICAgIGxldCBjdXJVbml0ID0gMTsKICAgICAgICAgICAgbGV0IGxlbmd0aCA9IFsuLi5zdHJdLmxlbmd0aDsKCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGxldCBjYyA9IGdldFVURjhDaGFyKHN0ciwgaSk7CiAgICAgICAgICAgICAgICBsZXQgY29kZSA9IGdldFVURjhJbmRleE9mKGNoYXJTZXQsIGNjKTsKCiAgICAgICAgICAgICAgICByZXMgKz0gY3VyVW5pdCAqIGNvZGU7CiAgICAgICAgICAgICAgICBjdXJVbml0ID0gY3VyVW5pdCAqIGdldFVURjhMZW4oY2hhclNldCk7CgogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXM7CgogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBlbmNvZGVCYXNlTihjaGFyU2V0LCBiYXNlNjRTZXQsIGNoYXIpIHsKCiAgICAgICAgICAgIGxldCBpbmRleCA9IGJhc2U2NFNldC5pbmRleE9mKGNoYXIpOwogICAgICAgICAgICBsZXQgcmVzID0gIiI7CiAgICAgICAgICAgIGxldCByZW1haW4gPSBpbmRleDsKICAgICAgICAgICAgbGV0IGxlbiA9IGdldFVURjhMZW4oY2hhclNldCk7CiAgICAgICAgICAgIGxldCBkbG9vcGl2ID0gcmVnTnVtKGdldFVURjhMZW4oY2hhclNldCksIGJhc2U2NFNldC5sZW5ndGgpOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRsb29waXY7IGkrKykgewoKICAgICAgICAgICAgICAgIGxldCBkaXYgPSBNYXRoLmZsb29yKHJlbWFpbiAvIGxlbik7CiAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJlbWFpbiAlIGxlbjsKICAgICAgICAgICAgICAgIGxldCBjYyA9IGdldFVURjhDaGFyKGNoYXJTZXQsIGNvZGUpOwoKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNjKTsKICAgICAgICAgICAgICAgIGNjID0gY2MgKyAiIjsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNjKTsKICAgICAgICAgICAgICAgIHJlbWFpbiA9IGRpdjsKICAgICAgICAgICAgICAgIHJlcyArPSBjYzsKCgogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXM7CgogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiByZWdOdW0oZGl2LCBudW0pIHsKICAgICAgICAgICAgbGV0IHJlbWFpbiA9IG51bTsKICAgICAgICAgICAgbGV0IHJlcyA9IDA7CiAgICAgICAgICAgIHdoaWxlICh0cnVlKSB7CiAgICAgICAgICAgICAgICBsZXQgbm4gPSBNYXRoLmZsb29yKHJlbWFpbiAvIGRpdik7CiAgICAgICAgICAgICAgICBpZiAobm4gPiAwKSB7CgogICAgICAgICAgICAgICAgICAgIHJlcysrOwogICAgICAgICAgICAgICAgICAgIHJlbWFpbiA9IG5uOwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfSBlbHNlCgogICAgICAgICAgICAgICAgICAgIGlmIChyZW1haW4gJSBkaXYgPiAwKSB7CgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzICsgMTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KICAgICAgICB9CgoKICAgICAgICBmdW5jdGlvbiBlbmNvZGVUb0Jhc2U2NCgpIHsKICAgICAgICAgICAgdmFyIGlucHV0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImlucHV0U3RyaW5nIikudmFsdWU7CiAgICAgICAgICAgIHZhciBlbmNvZGVkID0gYnRvYSh1bmVzY2FwZShlbmNvZGVVUklDb21wb25lbnQoaW5wdXQpKSk7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCJmcm9tPSIgKyBpbnB1dCkKICAgICAgICAgICAgY29uc29sZS5sb2coImVuY29kZWQ9IiArIGVuY29kZWQpCiAgICAgICAgICAgIGxldCBjaGFyU2V0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NoYXJTZXRJbnB1dCcpLnZhbHVlOwoKICAgICAgICAgICAgZW5jb2RlZCA9IHJlcGxhY2VCeUNoYXJUYWJsZShjaGFyU2V0LCBiYXNlNjRTZXQwLCBlbmNvZGVkKQogICAgICAgICAgICBjb25zb2xlLmxvZygiZW5jb2RlZCBjdXM9IiArIGVuY29kZWQpCgogICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiYmFzZTY0U3RyaW5nIikudmFsdWUgPSBlbmNvZGVkOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gZGVjb2RlRnJvbUJhc2U2NCgpIHsKICAgICAgICAgICAgdmFyIGlucHV0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImJhc2U2NFN0cmluZyIpLnZhbHVlOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgbGV0IGNoYXJTZXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnY2hhclNldElucHV0JykudmFsdWU7CgogICAgICAgICAgICAgICAgdmFyIGlucHV0MSA9IHJlcGxhY2VCYWNrQnlDaGFyVGFibGUoY2hhclNldCwgYmFzZTY0U2V0MCwgaW5wdXQpCiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiZnJvbT0iICsgaW5wdXQpCiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiZGVjb2RlZD0iICsgaW5wdXQxKQogICAgICAgICAgICAgICAgdmFyIGRlY29kZWQgPSBkZWNvZGVVUklDb21wb25lbnQoZXNjYXBlKGF0b2IoaW5wdXQxKSkpOwoKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJpbnB1dFN0cmluZyIpLnZhbHVlID0gZGVjb2RlZDsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgYWxlcnQoJ0ludmFsaWQgQmFzZTY0IHN0cmluZy4nKTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gdXBkYXRlQ2hhclNldCgpIHsKICAgICAgICAgICAgY2hhclNldCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdjaGFyU2V0SW5wdXQnKS52YWx1ZTsKICAgICAgICAgICAgaWYgKGdldFVURjhMZW4oY2hhclNldCkgPCAyKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZW5jb2RlVG9CYXNlNjQoKTsKICAgICAgICB9CiAgICA8L3NjcmlwdD4KPC9oZWFkPgoKPGJvZHk+CgogICAgPGgyPkJhc2VOIEVuY29kZXIvRGVjb2RlcjwvaDI+CiAgICA8ZGl2PiA8bGFiZWw+6Ieq5a6a5LmJ5a2X56ym6ZuG5ZCI55qE57yW56CBL+ino+eggTwvbGFiZWw+PC9kaXY+CiAgICA8YnI+CiAgICDlj6/ku6Xor5Xor5Xlh6DkuKrmnInmhI/mgJ3nmoTnu4TlkIg6CiAgICA8YnI+CiAgICDmkanlsJTmlq86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C90ZXh0YXJlYT4KICAgIDwvZGl2PgogICAgPGJyPgogICAgPGRpdj4KICAgICAgICA8bGFiZWwgZm9yPSJiYXNlNjRTdHJpbmciPue8lueggeWQjueahOaVsOaNrjwvbGFiZWw+CiAgICAgICAgPHRleHRhcmVhIGlkPSJiYXNlNjRTdHJpbmciIG9uaW5wdXQ9ImRlY29kZUZyb21CYXNlNjQoKSIgcGxhY2Vob2xkZXI9IuWcqOi/memHjOi+k+WFpeimgeino+eggeeahOaVsOaNrijovpPlhaXlkI7op6blj5HovazmjaIpIgogICAgICAgICAgICBzdHlsZT0id2lkdGg6IDEwMCU7IGhlaWdodDogMTAwcHg7Ij48L3RleHRhcmVhPgogICAgPC9kaXY+Cgo8L2JvZHk+Cgo8L2h0bWw+

ciagica, 字符集, ♩♩, rpb

Belmode   
👍
meeop
OP
  
🟦🟥🟧🟨🟩🟪🟫@🟨🟦🟦🟪🟫🟦🟩🟪🟦🟩🟩🟦🟨🟫🟦🟦🟧🟥🟪🟧🟦🟧🟥🟥🟧🟪🟦🟩🟦🟦🟧🟫🟦🟦🟦🟥🟪🟪🟦🟥🟥🟥🟨🟥🟥🟪🟨🟦🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟧🟦🟦🟫🟦🟧🟧🟦🟨🟦🟦🟩🟩🟦🟥🟪🟦🟥🟫🟦🟩🟩🟦🟦🟦🟥🟪🟪🟦🟥🟥🟥🟨🟥🟥🟪🟦🟥🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟧🟦🟩🟫🟦🟫🟫🟦🟨🟦🟦🟩🟩🟦🟥🟪🟦🟧🟫🟦🟩🟩🟦🟦🟦🟥🟪🟪🟦🟥🟥🟥🟨🟥🟥🟥🟥🟥🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟧🟦🟪🟫🟦🟩🟩🟦🟨🟦🟦🟩🟩🟦🟥🟪🟦🟧🟫🟦🟧🟫🟦🟦🟦🟥🟪🟪🟦🟥🟥🟥🟨🟥🟥🟩🟥🟥🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟧🟦🟫🟫🟦🟧🟧🟦🟨🟦🟦🟩🟩🟦🟦🟫🟦🟩🟨🟦🟥🟥🟦🟦🟦🟥🟪🟪🟦🟨🟥🟥🟥🟫🟦🟨🟧🟦🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟫🟦🟧🟪🟦🟩🟩🟦🟨🟦🟦🟩🟩🟦🟥🟫🟦🟦🟫🟦🟪🟥🟦🟦🟦🟥🟪🟪🟦🟨🟥🟥🟥🟫🟦🟫🟧🟦🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟫🟦🟨🟪🟦🟧🟧🟦🟨🟦🟦🟩🟩🟦🟥🟫🟦🟦🟫🟦🟨🟨🟦🟦🟦🟥🟪🟪🟦🟨🟥🟥🟥🟫🟦🟧🟨🟦🟪🟥🟥🟨🟥🟦🟦🟧🟥🟥🟫🟦🟨🟪🟦🟥🟧🟥🟨🟦🟦🟩🟩🟦🟥🟫🟦🟦🟫🟦🟪🟩🟦🟩🟥🟦🟧🟥🟥🟦🟫🟦🟧🟦🟥🟧🟥🟦🟧🟥🟥🟧🟥🟥🟪🟫🟦🟥🟥🟥🟥🟧🟦🟫🟫🟦🟨🟦🟦🟩🟩🟦🟥🟪🟦🟨🟥🟦🟥🟥🟦🟦🟦🟥🟪🟪🟦🟥🟥🟥🟧🟦🟥🟪🟧🟦🟪🟥🟥🟨🟥🟦🟦🟧🟥🟫🟥🟦🟧🟪🟦🟥🟧🟥🟨🟦🟦🟩🟩🟦🟥🟪🟦🟨🟥🟦🟨🟧🟦🟦🟦🟦
q11391   
@meeop 离谱
xhatt510   
怎么解码呢?
meeop
OP
  
不是两个文本框吗,上面文本框输入就编码,在下面文本框输入就是解码
您需要登录后才可以回帖 登录 | 立即注册

返回顶部