Issue #8 new

TypeError: must be string without null bytes, not str

devtty0
created an issue

Hi!

Why does BCRYPTPasswordManager.encode wait NULL-terminated string enstead of byte-array?

In [26]: bcrypt.encode('as\0d', 8)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-26-70730c34dffd> in <module>()
----> 1 bcrypt.encode('as\0d', 8)

/PRJ/venv/local/lib/python2.7/site-packages/cryptacular/bcrypt/__init__.pyc in encode(self, text, rounds)
     50             raise ValueError('_bcrypt.crypt_gensalt_rn returned None')
     51 
---> 52         encoded = self.crypt_rn(check_unicode(text), settings)
     53         if encoded is None:
     54             raise ValueError('_bcrypt.crypt_rn returned None')

TypeError: must be string without null bytes, not str

Comments (1)

  1. Log in to comment