That password is BCrypt hashed. (i can tell from the $2a$10$...)
Hopefully your platform has a:
BCrypt.CheckPassword(savedHash, enteredPassword);
function.
From my answer over here:
A BCrypt hash string looks like:
$2a$10$M/HQVUTyxrdbiwNjokJoUOIbUAK71yvYXKPe1YdFgS2I3Pw6Ojlju
$==$==$======================-------------------------------
Where
2a: Algorithm Identifier (BCrypt)
10: Cost Factor (1,024 rounds)
M/HQVUTyxrdbiwNjokJoUO: OpenBSD-Base64 encoded salt (22 characters, 16 bytes)
IbUAK71yvYXKPe1YdFgS2I3Pw6Ojlju: OpenBSD-Base64 encoded hash (31 characters, 24 bytes)
Edit: i just noticed these words fit exactly. i had to share:
$2a$10$TwentytwocharactersaltThirtyonecharacterspasswordhash
$==$==$======================-------------------------------
But BCrypt was created by guys who were working on OpenBSD. OpenBSD already defines a format for their password file:
$[HashAlgorithmIdentifier]$[AlgorithmSpecificData]
This means that the "bcrypt specification" is inexorably linked to the OpenBSD password file format. And whenever anyone creates a "bcrypt hash" they always convert it to an ISO-8859-1 string of the format:
$2a$[Cost]$[Base64Salt][Base64Hash]
A few important points:
2a is the alogithm identifier
1: MD5
2: early bcrypt, which had confusion over which encoding passwords are in (obsolete)
2a: current bcrypt, which specifies passwords as UTF-8 encoded
- Cost is a cost factor used when computing the hash. The "current" value is 10, meaning the internal key setup goes through 1,024 rounds
- 10: 210 = 1,024 iterations
- 11: 211 = 2,048 iterations
- 12: 212 = 4,096 iterations
the base64 algorithm used by the OpenBSD password file is not the same Base64 encoding that everybody else uses; they have their own:
Regular Base64 Alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
BSD Base64 Alphabet: ./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
So any implementations of bcrypt cannot use any built-in, or standard, base64 library
Armed with this knowledge, you can now verify a password correctbatteryhorsestapler against the saved hash:
$2a$12$mACnM5lzNigHMaf7O1py1O3vlf6.BA8k8x3IoJ.Tq3IB/2e7g61Km