This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Add bcrypt $2a$ to
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: out of date
Dependencies: Superseder: Add support of new crypt methods
View: 31664
Assigned To: Nosy List: christian.heimes, dholth, dstufft, jafo, jcea, pitrou, serhiy.storchaka
Priority: low Keywords:

Created on 2012-04-06 19:42 by dholth, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg157679 - (view) Author: Daniel Holth (dholth) * Date: 2012-04-06 19:42
The prefix for bcrypt '$2a$' is supported on many systems and could be added to

Could the documentation mention the available rounds parameter for most of these newer hashes? And that Unicode strings are automatically converted to utf-8 before being passed into the OS crypt() function, or is that just assumed to be common knowledge?
msg157690 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-04-06 20:58
This requires someone to propose a patch. If you are interested, you can read the Developer's Guide - - for more information on how to contribute.
msg192680 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-08 17:35
I'll have a look
msg192727 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-09 08:27
I can't find any system that supports $2a$. My Ubuntu box returns a string of 13 chars (plain crypt) and the BSD box returns just ":".
msg193276 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-07-18 10:00
Apparently, Django supports of variant of that format:
msg193282 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-18 11:17
The crypt module is just a thin wrapper around crypt(3). Some operating systems have support for $2a$ but apparently I don't have one at home. Django uses
msg203172 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-11-17 14:26
I think it would be better to provide a dedicated implementation of bcrypt. Most operating systems do not provide bcrypt (Linux, Windows).
msg304928 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-24 16:43
The support of the Blowfish hashing (prefix '$2a$') has been added in issue31664.
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58723
2017-10-24 16:43:34serhiy.storchakasetstatus: pending -> closed

superseder: Add support of new crypt methods

nosy: + serhiy.storchaka
messages: + msg304928
resolution: out of date
stage: needs patch -> resolved
2013-11-17 14:26:24christian.heimessetstatus: open -> pending

messages: + msg203172
2013-08-24 22:39:01dstufftsetnosy: + dstufft
2013-07-18 11:17:06christian.heimessetmessages: + msg193282
2013-07-18 10:00:21pitrousetmessages: + msg193276
2013-07-09 08:27:14christian.heimessetpriority: normal -> low
assignee: christian.heimes ->
messages: + msg192727
2013-07-08 17:35:43christian.heimessetversions: + Python 3.4, - Python 3.3
nosy: + christian.heimes

messages: + msg192680

assignee: christian.heimes
2012-04-18 20:08:03jceasetnosy: + jcea
2012-04-07 02:45:32r.david.murraysettype: enhancement
2012-04-06 20:58:02pitrousetnosy: + pitrou, jafo

messages: + msg157690
stage: needs patch
2012-04-06 19:42:57dholthsetcomponents: + Library (Lib)
versions: + Python 3.3
2012-04-06 19:42:27dholthcreate