djangosnippets.org: Latest snippets tagged with 'hash'https://djangosnippets.org/tags/hash/2016-06-26T13:58:06.005694-05:00Crypt-SHA512 password hasher
2016-06-26T13:58:06.005694-05:00ezubillagahttps://djangosnippets.org/snippets/10572/<p>Password hashing method using the crypt-sha512 algorithm, To be able to generate password compatible with the crypt-sha512 method avaiable in the standard crypt function since glib2.7 and used on modern linux distros. This provides compatibility with programs and systems that use the glibc crypt library for encrypting passwords (such as …</p>
Freely redistributabledrupal7 password check
2012-06-22T09:51:32.041580-05:00bramhttps://djangosnippets.org/snippets/2777/<p>Completely based on <a href="http://djangosnippets.org/snippets/2729/">snippet 2729</a> (see that snippet for useful comments!).
The above snippet did not work for me (something with MemoryError), so I looked at the Drula source code and reimplemented...</p>
Freely redistributableDrupal password hasher for migration
2012-04-09T10:36:56.375528-05:00dgrtwohttps://djangosnippets.org/snippets/2729/<p>This BasePasswordHasher allows the easy migration of passwords from Drupal to Django 1.4. Drupal stores its passwords using a SHA512 hash, but with some iterations and postprocessing.</p>
<p>This snippet allows you to migrate the username and passwords over seamlessly- the only necessary change is truncating the first character of each …</p>
Freely redistributableOld MySQL Password Hash
2009-05-15T10:38:28.376493-05:00tbackhttps://djangosnippets.org/snippets/1508/<p>A python implementation of the old MySQL PASSWORD() function.</p>
<p>This is insecure. There is a reason MySQL changed this in version 4.1. </p>
<p>Use it only if you have to!</p>
Freely redistributableUse crypt instead of sha1 as password hash algorithm
2007-08-26T11:39:45.166464-05:00akaiholahttps://djangosnippets.org/snippets/389/<p>This snippet uses signals to replace the <code>contrib.auth.models.User.set_password()</code> function with one that uses <em>crypt</em> instead of <em>sha1</em> to hash the password.</p>
<p><em>Crypt</em> is of course cryptographically inferior to <em>sha1</em>, but this may be useful for interoperability with legacy systems e.g. when sharing a user authentication database with unix, a …</p>
Freely redistributable