It seems that understanding what bcrypt is all about not clear for some people and as well as for me since I still keep reading SOF users’ questions. I got an example here about how to use bcrypt hashing:How do you use bcrypt for hashing passwords in PHP
As I understand that bcrypt is one-way string, and if so that means I can use it for hashing only. There are some articles mention that bcrypt is also used for encrypting, which is none sense to me and that’s because if I can encrypt a string that means I can decrypt it.
how the question is if bcrypt can be used for encryption, then how? can anyone give any example, please??
Thanks,
The bcrypt hashfunction/KDF is for hashing only.
blowfish, on which bcrypt is based is a block cipher i.e. it is used for encryption.
There is also an unrelated program called bcrypt, which uses blowfish based encryption.
Unfortunately many people use
bcryptandblowfishinterchangeably, which leads to confusion.