Skip to content

Commit

Permalink
Clean up SSHA test, turning a redundant test into something that actu…
Browse files Browse the repository at this point in the history
…ally covers the issue at hand.
  • Loading branch information
Martijn Pieters committed Feb 20, 2011
1 parent fc5a0b0 commit 23df21e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zope/password/password.py
Expand Up @@ -116,11 +116,11 @@ class SSHAPasswordManager(PlainTextPasswordManager):
>>> from base64 import urlsafe_b64decode
>>> salt = urlsafe_b64decode('XkOZbw==')
>>> encoded = manager.encodePassword('secret', salt)
>>> password = 'secret'
>>> encoded = manager.encodePassword(password, salt)
>>> encoded
'{SSHA}J4mrr3NQHXzLVaT0h9TuEWoJOrxeQ5lv'
>>> encoded = manager.encodePassword(password)
>>> manager.checkPassword(encoded, password)
True
>>> manager.checkPassword(encoded, password + u"wrong")
Expand Down

0 comments on commit 23df21e

Please sign in to comment.