#17481: leading zeros are missing from result of pbkdf2
---------------------------------+---------------------------------------
Reporter: bhuztez | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.4-alpha-1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by aaugustin):
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Accepted
Comment:
Confirmed with this totally over-engineered snippet:
{{{
>>> import difflib
>>> import hashlib
>>> from django.utils import crypto
>>> from M2Crypto import EVP
>>> for i in range(255):
... expected = repr(EVP.pbkdf2(chr(i), 'salt', 1, 20))
... actual = repr(crypto.pbkdf2(chr(i), 'salt', 1, 20,
digest=hashlib.sha1))
... if expected != actual:
... for l in difflib.unified_diff([expected], [actual], str(i),
str(i)):
... print l.rstrip("\n")
...
--- 186
+++ 186
@@ -1 +1 @@
-'\x00S\xd3\xb9\x1a\x7f\x1eT\xef\xfe\xbdmhw\x1e\x8an\x0b,['
+'S\xd3\xb9\x1a\x7f\x1eT\xef\xfe\xbdmhw\x1e\x8an\x0b,['
--- 241
+++ 241
@@ -1 +1 @@
-'\x00\xf6(/Vb\x82\xd7\xb7OJ\xfe\x8e\xf6N\x95\x12\xc5\x9b\x9f'
+'\xf6(/Vb\x82\xd7\xb7OJ\xfe\x8e\xf6N\x95\x12\xc5\x9b\x9f'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17481#comment:2>
Django <https://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.