Mail Archives: djgpp/1997/10/14/15:17:40
Chris Frolik (frolikcc AT indy DOT net) wrote:
: if that is the password. Instead, create a simple encryption function.
: For example:
<snip>
: Then, choose an arbitrary 8-character string. Run it through this
: function, and see what you get. The result should be your actual
: password. However, the string that you hard-code into your EXE should
: be the initial arbitrary string that you chose. To get the actual
: password, call get_password() using the string as the parameter. This
: makes things a little more secure, rather than just hardcoding the
: password into your EXE.
Sure, they wouldn't be able to find the password in a binary dump of the
.EXE any more, but as I said if they have the *source* you can't hide it
from them ;). You could make it harder to find, if you code like Mel, but
armed with your source code they *must* be able to find the password in
the end (simply by following through everything you do).
If the aim is simply to prevent the user from modifying the datafile, a
different encrpytion system could be used inside the packfile functions
(e.g. public key system), so that people could read but not write, unless
they also have the private password. This is probably going a bit far
though... ;)
--
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford
- Raw text -