• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

不使用“+/="的 base64 编码;(加号或等于)字符?

用户头像
it1352
帮助3

问题说明

我需要对一个大约 1000 个字符的字符串进行编码,该字符串可以是任何字节值 (00-FF).我不想使用十六进制,因为它不够密集.据我所知,base64 的问题在于它包含 /和 =,这是我在我的应用程序中无法容忍的字符.

I need to encode a string of about 1000 characters that can be any byte value (00-FF). I don't want to use Hex because it's not dense enough. the problem with base64 as I understand it is that it includes / and = which are characters I can not tolerate in my application.

有什么建议吗?

正确答案

#1

正如 Ciaran 所说,base64 实现起来并不难——但你可能想看看现有的库,它允许你指定一组自定义的要使用的字符.我很确定那里有很多,但你没有指定你需要哪个平台.

As Ciaran says, base64 isn't terribly hard to implement - but you may want to have a look for existing libraries which allow you to specify a custom set of characters to use. I'm pretty sure there are plenty out there, but you haven't specified which platform you need this for.

基本上,您只需要可接受的 65 个 ASCII 字符 - 最好除了换行符.

Basically, you just need 65 ASCII characters which are acceptable - preferably in addition to line breaks.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcbhaih
系列文章
更多 icon
同类精品
更多 icon
继续加载