FlyingJester / TurboSphere

TurboSphere Game Engine
9 stars 4 forks source link

Implement MD5 hashing for ByteArray and RawFile objects #15

Open FlyingJester opened 10 years ago

FlyingJester commented 10 years ago

MD5 hashing is not implemented for either the rawfile or bytearray object, even though TurboSphere ships with md5 reference libraries.

Radnen commented 10 years ago

Can you also add SHA-? MD5 is no good for encryption, and SHA barely gets by but at least it's slightly better. I've made the option an optional parameter in the hashing function, so that if you ran with normal Sphere 1.5 it'll always be MD5, but in your implementation it could be SHA-

FlyingJester commented 10 years ago

I certainly may, but that's sort of low priority. The MD5 feature of Sphere, I always thought, was more for fingerprinting than encryption.

Radnen commented 10 years ago

In fact Sphere is so old it was used for encryption! I even used it for encryption in an MMO tech demo, though I used a salt on the final string. I think the addition of SHA is not so bad if it's not too hard for you. For me, there was a good system library that had all manner of encryption algorithms in it.

FlyingJester commented 10 years ago

There are a lot of small, nicer SHA-1 and/or SHA-256/224 libraries with good licenses available for C++...I'll take a look.