File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package (" libbcrypt" )
2+ set_homepage (" https://github.com/trusch/libbcrypt" )
3+ set_description (" A c++ wrapper around bcrypt password hashing" )
4+ set_license (" MIT" )
5+
6+ add_urls (" https://github.com/trusch/libbcrypt.git" )
7+
8+ add_versions (" 2021.06.22" , " d6523c370de6e724ce4ec703e2449b5b028ea3b1" )
9+
10+ add_deps (" cmake" )
11+
12+ on_install (" !windows and !mingw" , function (package )
13+ local configs = {}
14+
15+ table.insert (configs , " -DCMAKE_BUILD_TYPE=" .. (package :is_debug () and " Debug" or " Release" ))
16+ table.insert (configs , " -DBUILD_SHARED_LIBS=" .. (package :config (" shared" ) and " ON" or " OFF" ))
17+
18+ import (" package.tools.cmake" ).install (package , configs )
19+ end )
20+
21+ on_test (function (package )
22+ assert (package :check_cxxsnippets ({test = [[
23+ void test() {
24+ std::string password = "test";
25+ std::string hash = BCrypt::generateHash(password);
26+
27+ BCrypt::validatePassword(password,hash);
28+ BCrypt::validatePassword("test1",hash);
29+ }
30+ ]] }, {configs = {languages = " c++17" }, includes = " bcrypt/BCrypt.hpp" }))
31+ end )
You can’t perform that action at this time.
0 commit comments