gpt4 book ai didi

java - 是否有任何库可以在 Java 中使用 RFC 3548 对字符串进行 Base64 编码/解码

转载 作者:行者123 更新时间:2023-11-30 03:35:00 28 4
gpt4 key购买 nike

我正在尝试解码java中的字符串。这个相同的字符串使用 RFC 3548 在外部系统中进行编码。我尝试了不同的库,例如 org.apache.commons.codec.binary.Base64,但正如预期的那样存在不一致。 apache 库似乎正在使用 RFC 2045。有人可以帮我解决这个问题吗?该字符串不是静态的,并且在不同的调用中不断变化。

最佳答案

您可以使用 Google 的 Guava 库,

base64()

根据其 documentation ,

The "base64" base encoding specified by RFC 4648 section 4 , Base 64 Encoding. (This is the same as the base 64 encoding from RFC 3548 .)

Download

关于java - 是否有任何库可以在 Java 中使用 RFC 3548 对字符串进行 Base64 编码/解码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28212286/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com