You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/08 18:20:45 UTC

[GitHub] nickva commented on a change in pull request #1212: Add bcrypt hashing option

nickva commented on a change in pull request #1212: Add bcrypt hashing option
URL: https://github.com/apache/couchdb/pull/1212#discussion_r173245554
 
 

 ##########
 File path: src/couch/src/couch_passwords.erl
 ##########
 @@ -51,7 +51,10 @@ hash_admin_password("pbkdf2", ClearPassword) ->
                                         Salt ,list_to_integer(Iterations)),
     ?l2b("-pbkdf2-" ++ ?b2l(DerivedKey) ++ ","
         ++ ?b2l(Salt) ++ ","
-        ++ Iterations).
+        ++ Iterations);
+hash_admin_password("bcrypt", ClearPassword) ->
+    LogRounds = list_to_integer(config:get("couch_httpd_auth", "log_rounds", "10")),
 
 Review comment:
   Maybe try `config:get_integer("couch_httpd_auth", "log_rounds", 10)` here. Right above pbkdf2 doesn't do it but since we have `get_integer/3` now it looks a bit cleaner.
   
   Also 10 might look better as a define at the top of the module. Though again, pbkdf2's default value isn't one, so up to you. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services