# Bcrypt generate /

**URL:** <https://discourse.nodered.org/t/bcrypt-generate/31399>\
**Category:** General\
**Created:** [10 August 2020 15:29 UTC](https://discourse.nodered.org/t/bcrypt-generate/31399 "2020-08-10T15:29:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![josekavunkal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/josekavunkal/32/18505_2.png) [@josekavunkal](https://discourse.nodered.org/u/josekavunkal)\
**Post date:** [10 August 2020 15:29 UTC](https://discourse.nodered.org/t/bcrypt-generate/31399/1 "2020-08-10T15:29:44Z")

</div>

I am using bcrypt node to create a encoded password and this is updated in settings.js programatically.

Sometimes the encrypted password have / (slash) and when I write this to file it encode it and  
it will result in password mismatch .

Two questions.  
1.Is there a way to avoid bcrypt from generating "/" ?  
2.Is there a way to avoid "/" getting encoded when we write file?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [10 August 2020 16:36 UTC](https://discourse.nodered.org/t/bcrypt-generate/31399/2 "2020-08-10T16:36:56Z")

</div>

> [@josekavunkal](#):
>
> Sometimes the encrypted password have / (slash) and when I write this to file it encode it and  
> it will result in password mismatch .

How are you writing it to a file to cause that?

---

<div class="post-metadata">

**Author:** ![josekavunkal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/josekavunkal/32/18505_2.png) [@josekavunkal](https://discourse.nodered.org/u/josekavunkal)\
**Post date:** [11 August 2020 05:31 UTC](https://discourse.nodered.org/t/bcrypt-generate/31399/3 "2020-08-11T05:31:05Z")

</div>

Hi Nick,

I found out that ,the problem is with sqlite DB ,it returns encoded string as result .  
ie slash is changed to utf8 chars ,this create wrong password.When i see this data using  
sqlmanager in browser it comes decoded.

password: "$2a$10$Y4rZdSSdrbEXUsMt7uVCiOAsFYYppkb13pyqDQ/4LJj1PW2CfhFN6"

&#x2F is the encoded part.

After posting this i noticed that &#x2F is converted to / ,so you cannot see &#x2F in password I pasted above.

Any solution for this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 October 2020 05:31 UTC](https://discourse.nodered.org/t/bcrypt-generate/31399/4 "2020-10-10T05:31:18Z")

</div>

Closed on 10 October 2020 05:31 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
