Easy. Just create a small program with only a return statement in it. Then copy and paste the novel to the end of the executable.Originally Posted by Hunter2
You weren't talking about the executing part be the novel were you?
Easy. Just create a small program with only a return statement in it. Then copy and paste the novel to the end of the executable.Originally Posted by Hunter2
You weren't talking about the executing part be the novel were you?
>>signed wrapping is undefined behavior and may or may not work the way you expect it to.
To echo Vicious: Wow, didn't know that.
Glad to learn something new
**EDIT**
Err, hmm... I was thinking that the novel would be the operating code, not just something appended at the end of the file
By the way, good grammar and an immersive plot will score extra points
Last edited by Hunter2; 09-01-2004 at 09:34 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
you could also use simple XOR encryption, and have the user create a password that will be mixed with another 128 bits to create the key... for example:Originally Posted by MMD_Lynx
user password: PASSWORD
random key (128 chars): v5r6a48e78c618a697re81...
user password and key (key): PvA5SrS6WaO4R8De78c618a697re81...
when the program puts data into the database, you can use that key to encrypt it:
out<<data^key;
then when the user enters their password, you can extract it from the key to check if it's right... then if it is... do the same you did to encrypt it:
in>>data;
data=data^key;
the main problem with mixing the key and password is that when they want to change the password, you have to then decrypt and reencrypt everything in the file so their new password will still be valid... for example:
old password: PASSWORD
new password: ADMINISTRATOR
old key: PvA5SrS6WaO4R8De78c618a697re81...
new key: AcD1M8IeNrI6SaT1RtA8TrO6R54cvr5a64r861a...
in>>data
data=data^old key;
out<<data^new key;
this method is fairly secure, with the biggest security issue being having the password integrated with the key in that way. you may even consider not having the password integrated with the key at all, but stored somewhere else, also encrypted with a different key.
here's some code to get you started: http://www.cprogramming.com/cgi-bin/...ategory&CID=12
Last edited by major_small; 09-02-2004 at 09:04 AM.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
How far are you in making your text based rpg? I started one not to long ago but I have accauly quit because I wasn't learning anuthing new and got boring. I never even got the map part let alone the magic system.