#3316: Adding `crypt' to list of password hashes for legacy apps.
-----------------------------+----------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian                
     Status:  new            |            Component:  Contrib apps          
    Version:  SVN            |           Resolution:                        
   Keywords:                 |                Stage:  Design decision needed
  Has_patch:  1              |           Needs_docs:  1                     
Needs_tests:  1              |   Needs_better_patch:  0                     
-----------------------------+----------------------------------------------
Changes (by Simon G. <[EMAIL PROTECTED]>):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 for what it's worth, I'm +1 on this too - the whole point of the auth
 framework hashing is that it's extendible to other hash formats (this is
 why we have md5 and sha1). Crypt is a fairly common hash, and I'm sure a
 lot of people would find it useful.
 
 However, I'm not sure if the if..elif..elif.. approach is best. It's a
 shame that the hash function in crypt isn't standardised (with "new()" and
 hexdigest(), or we could make this entirely future proof by doing
 something like:
 
 {{{
 try:
    hasher = __import__(algo)
    return hsh == hasher.new(salt+raw_password).hexdigest()
 
 except ImportError:
    raise ValueError, "Got unknown password algorithm type (%s) in
 password." % algo
 }}}
 
 This way the you could use any hashing method you want.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3316#comment:4>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to