This hash value is 70 characters long. How can I tell what type of encoding was used to generate it? Also, how many bits does each character hold?

  • 1
    $\begingroup$ It looks crypt-formatted. This documentation page will probably help you. $\endgroup$
    – dusk
    Commented Sep 24, 2017 at 17:01

1 Answer 1


That looks like bcrypt.

There are four parts:

  • $2y - identifier that this is bcrypt in modular crypt format.
  • $05 - number of key expansion rounds: in this case, it is 25

  • 68LWs...X/e - this is the salt. A total of 128 bits encoded in base64.

  • lfa1z...MwW - this is the hash. A total of 184 bits encoded in base64.

Since base64 encodes three bytes to four base64 characters, you get 6 bits for each base64 character.

  • 1
    $\begingroup$ +1, but three bytes encode to four characters (3*8/6) not six. $\endgroup$
    – Rup
    Commented Sep 25, 2017 at 2:30
  • $\begingroup$ @Rup Oh right! I was probably thinking six bits! $\endgroup$
    – Zizouz212
    Commented Sep 25, 2017 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.