### secure password storage library This library securely stores and validates passwords in a sqlite database. It can also create and redeem password reset tokens. Its runtime dependencies are present in the OpenBSD base system. Its build dependencies (meson) are easy to install. #### building ```sh # install the build system pkg_add meson ninja git clone https://dev.begriffs.com/git/libpw cd libpw # obtain my meson-wrap project used by the test suite git submodule update --init # initialize out-of-source build directory meson setup build # build the shared library and tests meson compile -C build # run the test suite meson test -C build ``` #### usage TODO: add more details. ```sh # create a db with the right schema sqlite3 passwords.sqlite3 < share/libpw-schema.sql ``` In C, open the database, and create a libpw password context. ```c #include #include int main(int argc, char **argv) { sqlite3 *db; pw_context *ctx; sqlite3_open("passwords.sqlite3", &db); pw_init_context(db, &ctx); pw_set(ctx, "root@example.com", "supersecurepass"); // etc } ``` For brevity, this snippet has no error checking. See `test/test.c` for more.