I have a string, but what I want to know is how this is generated?
3C+msMRwFDOcepm960C2kUfeFdBe2WoWLFATI+u7EKiFt9nqdPuI6nXIByUhBeNoCqaivEHp/dHimnfAeT0n7ZsZU6AmJkONCulPOLd8q09i+EzfWhW0GJmnvSIC3YEh5kuZOF62E63f12gjESKwyYVq4Y/iWcAu2TdyueX977U5O4BdLIEbDsmjSUhKLfiH8RvaGZrj4OpggOvpytsqcQ==
I did some research over the last days, and it seems its an base64 encoding but here we have also special characters in the string like "/+=". The plain text should be b33912c6-b805-412b-9660-b80186fc3b9f, but no encoding/encryption method I found online could get the same string.
Which encryption or encoding algorithm is used here?
I was given a encoded message as a challenge, and I am completely lost. Sorry if the answer to this is extremely obvious, but I cannot figure out what this code is supposed to represent. The code is:
JVCEK6CNIRCXOTKEIFTU2RCFPBGVIQLYJVCECZ2NIRCXQTKUIF4E2RCBM5GUIRLYJVKEC52NIRAWOTKEIV4E2VCBO5GVIRLHJVCEC6CNKRCXOTKUIFTU2RCBPBGUIRLYJVKEKZ2NIRAXQTKEIV4E2VCFM5GUIRLYJVKEC6CNKRCWOTKEIV4E2VCBPBGVIRLHJVCEK6CNKRAXQTKUIVTU2RCBPBGUIRLYJVKECZ2NIRCXQTKUIV3U2RCFM5GUIRLYJVCEK6CNKRCWOTKEIV4E2VCBPBGUIRLHJVCEK6CNKRAXQTKEIFTU2RCFPBGVIQLYJVCEKZ2NIRCXQTKEIF3U2VCBM5GUIRLYJVCEC6CNIRCWOTKEIF4E2RCFPBGVIQLHJVCEK6CNIRAXOTKUIVTU2RCFPBGUIRLYJVKEKZ2NIRCXQTKEIV4E2RCFM5GUIQLYJVCEK6CNKRCWOTKEIV4E2VCBPBGVIRLHJVCEK6CNIRAXOTKEIVTU2RCFPBGVIQLYJVCECZ2NIRCXQTKEIF3U2VCFM5GUIRLYJVCEK52NIRAWOTKEIF4E2VCFPBGVIRLHJVCEK6CNKRAXQTKUIFTU2RCBPBGVIRLYJVCEKZ2NIRCXQTKEIV4E2VCFM5GUIRLXJVCEK52NIRAWOTKEIV4E2RCBPBGVIRLHJVCEC6CNKRAXQTKEIVTU2RCFO5GVIQLXJVKEKZ2NIRCXOTKEIV3U2VCBM5GUIRLXJVKEK52NIRCWOTKEIV3U2VCBO5GVIQLHJVCEK52NIRCXOTKEIFTU2RCFO5GUIQLXJVCEKZ2NIRAXQTKUIF3U2RCBHU======
I believe it is base64 because of the = trailing at the end, but when converting it to ASCII, I get a bunch of nothing (making me think it is something else). I am not really asking for a direct answer to what the string is, but rather where I can go from here. I have already tried converting the binary value to jpg, but to no avail. Any help is greatly appreciated! (I also noticed it repeated JV*E a lot, I do not know whether that is significant or not.)
It's more likely base32 than base64, since there are no lower case letters, 1s, 8s, 9s, +s, or /s. Decoding it as base32 produces:
MDExMDEwMDAgMDExMTAxMDAgMDExMTAxMDAgMDExMTAwMDAgMDExMTAwMTEgMDAxMTEwMTAgMDAxMDExMTEgMDAxMDExMTEgMDExMTAxMTEgMDExMTAxMTEgMDExMTAxMTEgMDAxMDExMTAgMDExMTEwMDEgMDExMDExMTEgMDExMTAxMDEgMDExMTAxMDAgMDExMTAxMDEgMDExMDAwMTAgMDExMDAxMDEgMDAxMDExMTAgMDExMDAwMTEgMDExMDExMTEgMDExMDExMDEgMDAxMDExMTEgMDExMTAxMTEgMDExMDAwMDEgMDExMTAxMDAgMDExMDAwMTEgMDExMDEwMDAgMDAxMTExMTEgMDExMTAxMTAgMDAxMTExMDEgMDExMDExMTEgMDEwMDEwMDAgMDExMDAxMTEgMDAxMTAxMDEgMDEwMTAwMTEgMDEwMDEwMTAgMDEwMTEwMDEgMDEwMTAwMTAgMDEwMDEwMDAgMDEwMDAwMDEgMDAxMTAwMDA=
Hopefully, that helps.
I have to find out the following encoding where the http://imagebin.org/216644 image was encoded
Encoded http://imagebin.org/216644 image
UjBsR09EbGhDZ0FQQUljQUFBQUFBSHNzRFpRQUFLY3Z
BUDhBQU41NlNmL3NVTzIzblBmMzl3QUFBQUFBQUFBQU
FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ
...
What i know is:
- encoding is used to transfer attachments over the internet
- it is not base64 or uuencode (but there a similarity it is also produce 'FBQ' series)
What would be the best practice to find out the encoding method ? Is there any free software which has built in encoder/decoders to play with it ?
Thanks advance.
Cs.
UPDATE
Since the encoded part must starts with encoded 'GIF89a' which is here 'UjBsR09 ...
And since the encoded gif can be frequent on the internet thats why I tried to find
'UjBsR09' with Google, and it found a document where the base64Binary encoded part starts with it.
But
Every base64 encoder translate the 'GIF89a' to 'R0lGODlh' and not to 'UjBsR09' i could not find out what whould be the background.
I found the clue, it is not about mysterious encoding the image was taken by text, that why
Before the base64 I have to convert it to ascii.(since the gif is binary)
So insted of
encodeddata=base64(image);
push2Net(encodeddata);
must use
encodeddata=base64(bta(image))
push2Net(encodeddata);
Where bta implementation in Javascript e.g window.bta(data)
So I am wanting to send a request to a server I am working with, it requieres the binary value of a (utf-8 formatted nsstring) if there is such a thing, I have read that NSStrings are unicode formatted...
basically the idea is to send the value of the nsstring to the server without the added 3 byte header that UTF8 applies to the front of a string. This is because the server knows I will be sending it UTF8 formatted string in binary format so to save unnessacery formatting values that could bloat my requests I would like to try and do it this way.
dose any one have any ideas on how I might achieve this? I'm currently reading up about NSStrings on the apple docs, but there is so much to read and process I'm hoping someone can provide me some insight.
I don't have any code to show for this atm because I'm only in the planning and understanding phase of this, and to move forward I need to understand how this might be done so I can start coding it :)
any help would be greatly appreciated :)
NSString has a UTF8String method. It returns chars and chars are bytes. Does that work?
-(const char *)UTF8String
Return Value:
A null-terminated UTF8 representation of the receiver.
more info on it here.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html
If you have binary data that you need to encode, what encoding scheme do you use?
I know about:
Hex encoding. Very simple, but quite verbose, expands one byte to two.
Base 64. Most common, not so verbose, expands three bytes to four.
Base 85. Not common, less verbose again, expands four bytes to five.
Are there any other encoding schemes in common use? If so, what are there advantages and disadvantages?
Edit: This is useful, for example, when trying to store arbitrary data in a cookie. Cookies can only store text, not arbitrary data, so you need to convert it in some way, preferably with a way to convert it back. Further, assume that you are using a stateless server so that you cannot save the state on the server and just put an identifier into the cookie. Of course, if you do this you would also need some way of verifying that what the user is passing back to you is what you passed to the user, for example a signature.
Also, since the current consensus is that you should use base64 since it is widespread, I will also point out that this is what I use... I am just curious if anyone used anything else, and if so, why.
Edit: Just in case someone stumbles across this, if you do want to use Base64 to store data in a cookie, you need to use a modified Base64 implementation. See this answer for the reason why.
For encoding cookie values, you need to be careful. See this older answer:
With Version 0 cookies, values should
not contain white space, brackets,
parentheses, equals signs, commas,
double quotes, slashes, question
marks, at signs, colons, and
semicolons. Empty values may not
behave the same way on all browsers.
Base64 encoding can generate = symbols for certain inputs, and this technically is not permitted in cookies (version 0 cookies, anyway, which are the most widely supported). In practice, I suspect the = will actually work fine, but maybe not.
I would suggest that to be absolutely sure that your encoded binary is cookie-compatible, then basic hex encoding is safest (e.g. in java).
edit: As #Paul helpfully pointed out, there is a modified version of Base 64 that is "URL safe" (and, I assume, "cookie safe"). Using a modified version of a standard algorithm rather dilutes its charm, mind you.
edit: #shoosh pointed out that the = is only used to denote the end of the base64 string, so you could trim the =, set the cookie, then reattach the = again when you need to decode it.
Base64 wins because it's so common that I don't have to ever worry about rolling my own encoder/decoder. I haven't run into any applications where I've been worried about saving bandwidth or filespace in encoded binary data.
Once upon a time, there was UTF-7. It's officially deprecated, but it still works as an ACE (ASCII Compatible Encoding). Now there's IDN.
uuencode is popular is some circles
HTML and XML encode unicode using this syntax
Base64 is the de-facto standard. Using anything else is asking for trouble.