1 ### secure password storage library
3 This library securely stores and validates passwords in a sqlite database. It
4 can also create and redeem password reset tokens. Its runtime dependencies are
5 present in the OpenBSD base system. Its build dependencies (meson) are easy to
11 # install the build system
14 git clone https://dev.begriffs.com/git/libpw
17 # obtain my meson-wrap project used by the test suite
18 git submodule update --init
20 # initialize out-of-source build directory
23 # build the shared library and tests
24 meson compile -C build
32 TODO: add more details.
35 # create a db with the right schema
36 sqlite3 passwords.sqlite3 < share/libpw-schema.sql
39 In C, open the database, and create a libpw password context.
45 int main(int argc, char **argv)
50 sqlite3_open("passwords.sqlite3", &db);
51 pw_init_context(db, &ctx);
53 pw_set(ctx, "root@example.com", "supersecurepass");
58 For brevity, this snippet has no error checking. See `test/test.c` for more.