文本base64至hex base64

发布于 2025-02-10 02:51:41 字数 601 浏览 1 评论 0原文

我遇到了一个问题,其中一个API我使用converts base64 by hex,另一种是通过文本转换。我需要能够将十六进制字符串转换为文本,以使两个API的编码相同。 https://emn178.github.io/online-tools/online-tools/online-tools/base-tools/base64_encode.html 此页面包含一个很好的示例,如果我输入

fb95 <- HEX -- BASE64-> +5U=
fb95 <- TEXT -- BASE64-> ZmI5NQ==

有办法将A转换

std::string text("fb95");

为“十六进制”表示,该表示为 +5U =

或转换

std::string b64("ZmI5NQ==");

为 +5U =

I'm having an issue where one api I use converts base64 by Hex and another one converts by Text. I need to be able to convert the hex string to text so that the encoding is the same for both api's.
https://emn178.github.io/online-tools/base64_encode.html
This page contains a good example, if I input

fb95 <- HEX -- BASE64-> +5U=
fb95 <- TEXT -- BASE64-> ZmI5NQ==

Is there a way to convert a

std::string text("fb95");

to it's hex representation that is encoded as +5U=

or convert

std::string b64("ZmI5NQ==");

to +5U=

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文