Skip to main content
Participant
Jul 14, 2015 5:49 PM UTC
Question

hashing password with bcrypt in coldfusion


Hello

    I am trying to hash a password with bcrypt algorithm (try to match password with an off the shell software), but I keep getting error, it works for algorithms "SHA-1", "SHA-256" etc...<cfset hashpw = #hash(password_from_form, "SHA-1")#>, <cfset hashpw = #hash(password_from_form, "SHA-256")#>

   but  <cfset hashpw = #hash(password_from_form, "BCrypt")> don't work,  got error : The BCrypt is not supported by the security Provider you have chosen.

   Is there no bcrypt algorithm in coldfusion hash function ?

   Have been working on it over a week but without luck.

   btw, I am using dreamweaver 8.

    thank you so much in advance.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Charlie Arehart
    Community Expert
    Community Expert
    Nov 15, 2020 11:53 PM UTC

    I realize I'm responding to this post 5 years after it was made, but I just want to share that CF2021 has added a bcrypt function. Even if it may be too late for the folks who participated on this thread in the past I share it because this post is one of the first results that comes up in google search on coldfusion and bcrypt. Here's a link to the new docs:

     

    https://helpx.adobe.com/coldfusion/user-guide.html/coldfusion/cfml-reference/coldfusion-functions/functions-a-b/bcrypt.ug.html 

    Translate
    /Charlie (troubleshooter, carehart. org)
    Inspiring
    Jul 15, 2015 7:53 AM UTC

    Coldfusion doesn't support bcrypt in the hash function. You will have to use a java version and integrate it.

    You can do something like this : http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/using-bcrypt-in-coldfusion-10-370

    This is for CF10 / 11 but there are various similar ways and post online about this depending on the version of Coldfusion you use. Let me google that for you

    Translate
    ben7Author
    Participant
    Jul 16, 2015 7:16 PM UTC

    sorry I was out for a few days.

    thank you so much for the info. I am using dreamweaver 8 but in the process of converting it to cf11.

    The code is kind of complicated for me, but I will digest it slowly, I will let you know what happens.

    thanks again.

    Translate