Convert secrets.c to use dbwrap