On 5/14/07, Forest Bond <[EMAIL PROTECTED]> wrote:
> You mean:
>
>      decrypted_passport = k.decString(base64.b64decode(self.passport))
>      self.passport = decrypted_passport
>
> Right?
Yeah... that's the one ;-)
Thanks for catching that, Forest.

elemental:
Looking at this again, I'm still concerned by the fact that it's being
put back into self.passport.  If you call save() after decrypting, it
will be stored in the database unencrypted.

I'd recommend doing:
    def get_passport(self)
        ....
        return k.decString(base64.b64decode(self.passport))

That way the value of self.passport is always encrypted and you won't
accidentally save unencrypted data to the database.

 - Ben

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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