Skip to content

Commit

Permalink
Implement base64_digest() method in bcrypt class
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed Feb 12, 2018
1 parent 8523871 commit 3772697
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hash.cpp
Expand Up @@ -188,4 +188,9 @@ std::string bcrypt::hex_digest() const
return std::string(hash.data());
}

std::string bcrypt::base64_digest() const
{
return std::string(hash.data());
}

} // namespace utils
1 change: 1 addition & 0 deletions src/hash.hpp
Expand Up @@ -82,6 +82,7 @@ class bcrypt : public hash_digest<BCRYPT_HASHSIZE, char>
static bool is_valid_prefix(const std::string& hash);
std::string get_salt() const;
virtual std::string hex_digest() const override;
virtual std::string base64_digest() const override;
};

} // namespace utils

0 comments on commit 3772697

Please sign in to comment.