]>
| description | Secure password storage with sqlite backend |
| last change | Mon, 24 Mar 2025 05:00:00 +0000 (00:00 -0500) |
| git clone | https://dev.begriffs.com/git/libpw |
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.
# 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 buildTODO: add more details.
# create a db with the right schema
sqlite3 passwords.sqlite3 < share/libpw-schema.sqlIn C, open the database, and create a libpw password context.
#include <sqlite3.h>
#include <pw.h>
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.
| 2025-03-24 | Joe Nelson | Initial readme main | commit | commitdiff | tree | snapshot |
| 2025-03-07 | Joe Nelson | Update subprojects | commit | commitdiff | tree | snapshot |
| 2024-12-01 | Joe Nelson | Switch to Meson build system | commit | commitdiff | tree | snapshot |
| 2025-01-05 | Joe Nelson | WIP: pw reset token generation | commit | commitdiff | tree | snapshot |
| 2025-01-01 | Joe Nelson | More information about dummy hash choice vs NULL | commit | commitdiff | tree | snapshot |
| 2025-01-01 | Joe Nelson | Informative status codes for all funcs | commit | commitdiff | tree | snapshot |
| 2024-12-29 | Joe Nelson | Ignore more artifacts | commit | commitdiff | tree | snapshot |
| 2024-12-29 | Joe Nelson | Tests | commit | commitdiff | tree | snapshot |
| 2024-12-29 | Joe Nelson | Connection "context" struct | commit | commitdiff | tree | snapshot |
| 2024-12-15 | Joe Nelson | Prevent a clue that user is missing | commit | commitdiff | tree | snapshot |
| 2024-12-15 | Joe Nelson | WIP: initial work | commit | commitdiff | tree | snapshot |
| 9 months ago | main | shortlog | log | tree |