我已经编码了字符串,但是我不知道它是什么类型

时间:2019-05-18 15:09:36

标签: base64

我有两个使用相同编码方法的编码字符串,但我不知道它是什么类型。

我尝试使用base64解码,但是没有用。

这是我拥有的第一个编码字符串3qpY0Vw86MZykGfqc7jnVg==

这是我拥有的第二个编码字符串nB6dtl3iA5IE1Z+g9SpBrw==

他们使用相同的编码方法。

我想知道该字符串中使用的编码类型。我也想知道如何解码它。

1 个答案:

答案 0 :(得分:0)

那些base64有效负载可能包含字符串以外的其他内容,例如原始二进制文件,图像,加密的有效负载等,这些内容无法显示为文本。 base64并非专门用于编码文本。

例如保存到文件:

$ printf %s 'iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAMfUlEQVR4Xu1bC3BU1Rn+7mN3E8IjEiAY3iQxIA8bKiJSRUofjLZKx0cf6mgfap3O6NjptNNqW6vjYDt2+pip09ZXqXa01amIoqJTpVYIijYIpFEgBAMkhEB4JCG7e/fe2+8/ezdsHhYq7t7d5H6ZO3tz7tm7e//vnO9/nLOaSyCAb9C91wA+ISDAZwQE+IyAAJ8REOAzAgJ8RkCAzwgI8BkBAT4jIMBnBAT4jIAAnzHoCbCbt8La+CicQ41eS25hUBOQ+M9LiK++A7G1K5DY9Be4iZh3JXcwKMvRbvQYrA0PI1H7NziH9/IpNWjDShD+/A8Rmne11ys3MOgIcKMdiL34M9hbVnPERwEjDE3a7Tj0sZWIXH4fjCnzk51zAINOgrRwEQ28AG7HgaTxOfplBsi507aDM+OPcI7s83r7j8HnA3Qd5uxLEVpyG3C83WsUDkiCbiJR/wqsd56gg8gNfzAonbAWHobQwm9Ar1oKN9bptbJdN9RrYsNDdNAvq3O/MWijIH30FIQ//V1ow8dS/y2vleAscOPHEXtlBZyWOq/RPwzqMNSctlBFPoh2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