On May 9, 2011, at 11:43 AM, ALJ wrote:

> I was really looking for something lightweight. I didn't really want
> to have to change the model structure to include a UUID ... although I
> realise that this seems to way to go. I really just wanted to avoid
> any 'opportunistic' attempts at extracting the data. The data itself
> isn't critical and not worth the effort of going to great lengths to
> crack any encryption I would put in. I was tempted to just use base64,
> perhaps joining the PK and the postcode for example. That might be
> enough just to obfuscate the id a bit and have a pseudo dual key.
> 
> Oh well.
> 
> Thanks anyway.
> 

We needed a similar way to obfuscate publicly accessible objects and we didn't 
want usage information leaked by exposing the public key.  We found and have 
been using short_url for over six months now.  We use 
<http://www.michaelfogleman.com/2009/09/python-short-url-generator/> to 
generate short URL's from the primary key (integer).  The short_url code is 
handy, because it doesn't need any extra columns in the database and it is 
pretty hard for users to reverse engineer the primary key id from the short URL.

--
Eric Chamberlain, Founder
RF.com - http://RF.com/







-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to