Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / C++ Encryption Scheme

Author
Message
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 4th Oct 2008 08:56 Edited at: 4th Oct 2008 08:58


What do you think? It's been tested, works good enough. Only two minor artifacts.

"rawr" will produce the same as "awrr", because of the (irreversible!) averaging technique.

I'm not sure if the random generator will produce different results on different machines. I doubt it will, but still...

Sorry, it has been brought to my attention by Darkcoder that this is actually a hashing technique. Oh well.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 4th Oct 2008 09:02
Ok, so maybe it sucks, but it's ok for my first try, right?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 4th Oct 2008 17:19
Interesting but it seems to be a one way encryption. Can you reverse it from the derived string to get the original?

As for the averaging, you might try

sum+=(int(to_be_encrypted[i])*(i+1));

This at least weighs each character value against it's position within the string. It's no guarantee that some other string won't produce the same result.

As for producing the same result on different machines, I'd say it depends on where the srand and rand functions reside and if there's any difference between them. Assuming that they're in some DLL it's possible that the routine could be different unless Microsoft has made an effort to maintain compatibility across all distributions.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-11-25 03:48:59
Your offset time is: 2024-11-25 03:48:59