Base 64

New releases and general discussions.

Post » Tue Nov 04, 2008 4:18 pm

Base 64! From PHP!
A great plugin!
B
2
G
4
Posts: 46
Reputation: 1,142

Post » Tue Nov 04, 2008 4:25 pm

Why? What does it do?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Nov 04, 2008 10:41 pm

look for md5.
But you can crypt the text and descypt.
B
2
G
4
Posts: 46
Reputation: 1,142

Post » Tue Nov 04, 2008 11:08 pm

Why would that be useful?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Nov 04, 2008 11:30 pm

Because Md5 dont have descrypt D:
B
2
G
4
Posts: 46
Reputation: 1,142

Post » Tue Nov 04, 2008 11:43 pm

Base 64 is not encryption. It's a number base, like binary. However, we do need an encryption plugin.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed Nov 05, 2008 11:43 am

Oy. There's three fairly different things going on in here. Or two, if you leave encryption aside for the time being.

The base64 functions in PHP are an implementation of one of the content encoding schemes in MIME (rfc2045). They convert arbitrary bytes into (and back from) strings of 7-bit-ascii characters, which you can then send through channels designed to handle text but not binary traffic. Base64 en-/decoding is not cryptographic. It's not designed to be hard to attack, and even if it were, there is no key involved: Anyone can decode anyone's base64-encoded data. That's the point, really.

I don't see much use for this in Construct; but maybe I just lack imagination -- I don't really see the constructy need for crypto either.

md5 is a different beast entirely. It's a hash function which calculates a relatively short "fingerprint" of any file you throw at it. This is (intended to be, although there are weaknesses in practice) cryptographically secure in the sense that although many different random collections of bits will produce the same md5 value, an attacker shouldn't be able to construct a legitimate-looking but different file to match a given hash. But it's an irreversible operation: you can't "decrypt" it, there's no way to extract the original file from the hash. All you can do is run the hash operation on a file you're given and compare the result with a known-good value. If the values match, you can assume that the file you have is an unchanged copy of the original.

Something like this might be used in Construct to check if in-game downloads are complete and uncorrupted, or if you want to make it a little harder for your players to edit their save files; but it doesn't seem like the most pressing of concerns.
B
2
S
1
G
4
Posts: 60
Reputation: 1,320


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests