etcimon / botan

Block & stream ciphers, public key crypto, hashing, KDF, MAC, PKCS, TLS, ASN.1, BER/DER, etc.
Other
86 stars 22 forks source link

bcrypt doesn't work on Windows #46

Closed atimin closed 6 years ago

atimin commented 6 years ago

I use function check_bcrypt to check password:

                auto pass = "";
                auto hash = "$2a$10$I0fc8gzfwMLFS2H79LFxHOJ6CMd8jB7s1MizshLwQqrwe5DlMJnNC";
                if (Botan::check_bcrypt(pass, hash)) {
                    LOG_INFO("Success");
                } else {
                    LOG_INFO("Unsuccess");
                }

This code works perfect in Linux and the function returns true as it must do. On Windows it returns false.

Linux version is compiled by gcc-6.3.3 for x64 architecture. Windows version uses VisualStudio 2017 compiler for x86 architecture. Botan's version is 2.6.