KyrptLib

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

You must login to post a comment. Don't have an account? Register to get one!

  • 3 comments
  • Avatar of b0ne123 b0ne123 Apr 05, 2011 at 16:00 UTC - 0 likes

    getting "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

  • Avatar of avogatro avogatro Jan 09, 2011 at 13:58 UTC - 0 likes

    Why only hash. I wast only 72-80 char for encryption. If u want to use the hash, u can use hashlib

  • Avatar of MotiveMe MotiveMe Jan 08, 2011 at 21:55 UTC - 0 likes

    Impressive. I could actually make good use of this hash function. :)

    CortexRP.com Creator

  • 3 comments

Facts

Date created
Jan 08, 2011
Category
Last update
Jan 13, 2011
Development stage
Release
Language
  • enUS
License
BSD License
Downloads
639
Recent files

Authors