-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[split #103] edit text #107
base: main
Are you sure you want to change the base?
Conversation
I need confirmation as to why the last bytes can be garbage. |
The save is not padded at all, therefore closing this PR. |
I only got 0 or 1 or 2 bytes of garbage in here are
If you are talking about MacOS, you are wrong (maybe your AES decryptor automatically removes padding). If above sentence is wrong please send last 32 bytes of your save file (the without padding one). |
Those bytes are likely Base64 padding, and no, I'm not talking about macOS saves. |
Base64 is padded with Here are last 2 bytes of https://gdccdated.glitch.me/s/CCLocalLevels_windows_2bytes_of_garbage.dat in hex:
here they are xored with
( Neither of these are Also NUL ( |
The code for calculating Windows save file sizes is as follows Basically if the length before encoding is divisible by 3, the final save file size is just |
I am re-opening this PR and #106, as this makes the observation that "If file size is not divisible by 4, last |
In fact, the included base64 padding (the equal signs) is mandated by the standard just to make sure the length of the final content is divisible by 4. I believe the cited reason for that is easy concatenation of multiple base64 strings of various lengths without the need to decode them |
|
The ability to decode concatenated strings like that depends on the decoder, it's true that a lot of encoders drop the ability to recover strings concatenated like this, however many do include this ability, for example the website https://www.base64decode.com/ or the GNU base64 utility.
I have no idea how the implementation in GD itself behaves in this regard, not that it really matters for this purpose |
Splitting #103.
This one is about
edit text
.I think this is last one.