diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-17 00:56:37 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-20 23:58:34 +0100 |
| commit | 304796f9f184a783d0af21e445c690ed69de048b (patch) | |
| tree | 2e32e9a0b39651f6c2753e689032c909fcde3a73 /PuzzleApplet.java | |
| parent | 9f2eef876275a451b015c22961130b2e507ddd49 (diff) | |
| download | puzzles-304796f9f184a783d0af21e445c690ed69de048b.zip puzzles-304796f9f184a783d0af21e445c690ed69de048b.tar.gz puzzles-304796f9f184a783d0af21e445c690ed69de048b.tar.bz2 puzzles-304796f9f184a783d0af21e445c690ed69de048b.tar.xz | |
Hex-encode non-ASCII random seeds in save files
The developer documentation claims that save files are long ASCII
strings. This is mostly true, but there's nothing stopping a user
from entering non-ASCII characters as random seeds. The ASCII
property of save files is useful, so encode seeds in hex before
writing them unless they consist only of printable ASCII characters.
Hex-encoded seeds are written under a new key, HEXSEED, to distinguish
them from unencoded seeds. This means that old versions of the code
won't be able to load encoded seeds, but that's not a great loss:
seeds aren't generally portable between versions anyway.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions