General
Banks are really cool, u can save game or save statistics. But the file is saved in you local folder:
C:\Users\[user name]\Documents\StarCraft II\Accounts/[random numbers]/Banks"
I want to secure this information and disallow player access this data, because it is cheat, if u can edit your save games. right?
We can transform almost anything to string and back. That is why, there are only functions for strings in my lib.
Detail
AES and Sha256 are encryption standard. I tried to implement them well. the string+random salt will be encrypted together, so the same values looks different, every time u save it. The Sha256 hash will be generated from string+salt. and if someone change the value, we will know it, because we compare the Sha256 hash of the decrypted data to old hash.
The result is just 2 functions for encrypt and decrypt. The Initialisation will be done automatically.
I like Feedback, pls do some comment. :D
Code
Variable - Set input = "Ich bin-gluecklich" //notice that password has 16 chars Variable - Set password = "ICH23EDe3d7890hg" Variable - Set output = (<KryptCode> EncryptString(input,password)) Variable - Set output = (<KryptCode> DecryptString(output,password))
Download
- http://www.sc2mapster.com/maps/kyrptlib/files/2-kyrpt-lib-v1-01-testmap/
- http://www.sc2mapster.com/maps/kyrptlib/files/1-kyrpt-lib-v1-01/

- 3 comments
- 3 comments
Facts
- Date created
- Jan 08, 2011
- Category
- Last update
- Jan 13, 2011
- Development stage
- Release
- Language
- enUS
- License
- BSD License
- Downloads
- 423
- Recent files
- R: KyrptLib V1.02 Jan 13, 2011
- R: KyrptLib V1.01 testmap Jan 08, 2011
- R: KyrptLib V1.01 Jan 08, 2011
- Reply
- #3
b0ne123 Apr 05, 2011 at 16:00 UTC - 0 likesgetting "err" as decrypt resullt :(
A programmer started to cuss
Because getting to sleep was a fuss
As he lay in his bed
Looping 'round in his head
Was: while (!asleep()) sheep++;
twitter.com/SC2IncomeWars
facebook.com/SC2IncomeWars
- Reply
- #2
avogatro Jan 09, 2011 at 13:58 UTC - 0 likesWhy only hash. I wast only 72-80 char for encryption. If u want to use the hash, u can use hashlib
HOWTO EDIT THE WIKI
- Reply
- #1
MotiveMe Jan 08, 2011 at 21:55 UTC - 0 likesImpressive. I could actually make good use of this hash function. :)
CortexRP.com Creator