Integer ID obfuscation techniques

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-04-02T07:12:31Z Indexed on 2010/04/02 7:13 UTC
Read the original article Hit count: 795

Hi there,

I'm looking for an easy and reversible method of obfuscating integer IDs. Ideally, I'd want the resulting obfuscation to be at most eight characters in length and non-sequential, meaning that the obfuscation of "1" should look nothing like the obfuscation for "2" and so on.

This isn't meant to be secure by any means, so this isn't a huge concern. Additionally, the integers I'll be obfuscating aren't large - between one and 10,000 - but I don't want any collisions, either.

Does anybody have any ideas for something that would fit this criteria?

Thanks!
Chris

© Stack Overflow or respective owner

Related posts about c#

Related posts about encryption