的base64带&QUOT混在codeD数据;随机"十六进制 [英] base64 encoded data mixed in with "random" hex

查看:128
本文介绍了的base64带&QUOT混在codeD数据;随机"十六进制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的一些数据的连接的base64 codeD输入字符串。不幸的是,它就会随机的十六进制数据(全部小写)混吧。这是相当简单的手工进行梳理,因为十六进制数据都似乎是在32个字节段。例如,我可以格式化字符串,例如像这样的:

I get an input string with some data that's base64 encoded. Unfortunately, it gets random hexadecimal data (all lowercase) mixed it. It's fairly straightforward to sort out by hand because the hexadecimal data all seems to be in segments of 32 bytes. For example, I can format an example string like this:


    6dd11d15c419ac219901f14bdd999f38
    0ad94e978ad624d15189f5230e5435a9
    2dc19fe95e583e7d593dd52ae7e68a6e
    465ffa6074a371a8958dad3ad271181a
    23310939b981b4e56f2ecee26f82ec60
    fe04bef49be47603d1278cc80673b226

    VGhpcyBpcyBzb

    6dd11d15c419ac219901f14bdd999f38
    0ad94e978ad624d15189f5230e5435a9
    2dc19fe95e583e7d593dd52ae7e68a6e
    465ffa6074a371a8958dad3ad271181a
    23310939b981b4e56f2ecee26f82ec60
    fe04bef49be47603d1278cc80673b226
    6dd11d15c419ac219901f14bdd999f38
    0ad94e978ad624d15189f5230e5435a9
    2dc19fe95e583e7d593dd52ae7e68a6e
    465ffa6074a371a8958dad3ad271181a
    23310939b981b4e56f2ecee26f82ec60
    fe04bef49be47603d1278cc80673b226

    21lIGJhc2UtNjQ

    bb4af7e61760735ba17c29e8f542a668
    75da91e90863f1ddb7e149297fc59afc
    f5de951fb65d06d2927aab7b9b54830e
    2d935616a54c381c2f38db3731d5a378

    gZW5jb2RlZCB

    6dd11d15c419ac219901f14bdd999f38
    0ad94e978ad624d15189f5230e5435a9
    2dc19fe95e583e7d593dd52ae7e68a6e
    465ffa6074a371a8958dad3ad271181a
    23310939b981b4e56f2ecee26f82ec60
    fe04bef49be47603d1278cc80673b226

    kYXRhIGhvb3JheSE=

基本上,我需要出去得到的base64的东西,去code将其(在PHP)。美中不足的是,我得到这一切作为一个长字符串,它并不总是显而易见放在哪里的换行符。例如,BASE64东西第一位在'B',很容易误认为某些十六进制数据的结束。我在一个损失如何做到这一点的东西...任何想法?

Basically, I need to get the base64 stuff out and decode it (in PHP). The catch is that I get it all as one long string and it's not always immediately obvious where to put the linebreaks. For example, the first bit of base64 stuff ends in 'b', easily mistaken for some of the hex data. I'm at something of a loss for how to do this... Any ideas?

谢谢!结果
-mala

Thanks!
-mala

推荐答案

我觉得这是一个无法回答的问题 - 这是完全可能的32个字节的base64恩codeD数据的价值,不能从32鉴别字节随机十六进制的。如果没有关于流的详细信息,就不可能做出决定去哪家桶这样的数据可能会去。

I think this is an unanswerable problem -- it is entirely possible to have 32 bytes worth of base64-encoded data that cannot be differentiated from 32 bytes of random hex. Without more information about the stream it would be impossible to make a decision as to which bucket such data might go.

这篇关于的base64带&QUOT混在codeD数据;随机"十六进制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆