Skip to content

Commit

Permalink
Remove redundant size check
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed Feb 12, 2018
1 parent cfa34ad commit a9bfb8f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/hash.cpp
Expand Up @@ -144,9 +144,6 @@ bcrypt::bcrypt(const std::string& input)
bcrypt bcrypt::from_salted_salt(const std::string& input)
{
bcrypt hash { input };
hash.iteration_count_delim_pos = input.find('$', 4);
if(hash.iteration_count_delim_pos == std::string::npos)
throw hash_error("hash string malformed");
std::string bcrypt_salt = input.substr(0, hash.iteration_count_delim_pos + 23);
if(bcrypt_salt.size() >= BCRYPT_HASHSIZE)
throw hash_error("hash string too large");
Expand Down

0 comments on commit a9bfb8f

Please sign in to comment.