From ce8a29b13eab749b90e7f0d071ebdc9d4c986cc4 Mon Sep 17 00:00:00 2001 From: Christoph Hilchenbach <11504129+hilch@users.noreply.github.com> Date: Thu, 26 Dec 2019 17:33:10 +0100 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index efdba22..65f94e1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # Bcrypt.cpp -A c++ wrapper around bcrypt password hashing +A c++ wrapper around bcrypt (origin: Open BSD) password hashing + +## How to use + +Here an example how to use this wrapper class + +```cpp +#include "bcrypt.h" +#include + +int main(){ + std::string password = "test"; + std::string hash = BCrypt::generateHash(password); + + std::cout << BCrypt::validatePassword(password,hash) << std::endl; + std::cout << BCrypt::validatePassword("test1",hash) << std::endl; + + return 0; +} +```