Ejemplo n.º 1
0
    def test_fail_2(self):
        def return_none(*args):
            return None

        bcrypt = BCRYPTPasswordManager()
        bcrypt.crypt_rn = return_none
        bcrypt.encode("foo")
Ejemplo n.º 2
0
    def test_fail_3(self):
        def return_none(*args):
            return None

        bcrypt = BCRYPTPasswordManager()
        pw = bcrypt.encode("foobar")
        bcrypt.crypt_rn = return_none
        bcrypt.check(pw, "foo")
Ejemplo n.º 3
0
 def test_fail_3(self):
     def return_none(*args): return None
     bcrypt = BCRYPTPasswordManager()
     pw = bcrypt.encode('foobar')
     bcrypt.crypt_rn = return_none
     bcrypt.check(pw, 'foo')
Ejemplo n.º 4
0
 def test_fail_2(self):
     def return_none(*args): return None
     bcrypt = BCRYPTPasswordManager()        
     bcrypt.crypt_rn = return_none
     bcrypt.encode('foo')
Ejemplo n.º 5
0
 def test_fail_1(self):
     def return_none(*args): return None
     bcrypt = BCRYPTPasswordManager()
     bcrypt.crypt_gensalt_rn = return_none
     bcrypt.encode('foo')
Ejemplo n.º 6
0
 def set_password(self, value):
     """Accept a value, hash it and set it as the account password."""
     hashed = bcrypt.encode(value)
     self._password = unicode(hashed)
Ejemplo n.º 7
0
 def set_password(unencoded):
     bcrypt = cryptacular.bcrypt.BCRYPTPasswordManager()
     return bcrypt.encode(unencoded)
Ejemplo n.º 8
0
 def _set_password(self, password):
   self._password = bcrypt.encode(password)