HTAuth provides an API and commandline tools for managing Apache/httpd style htpasswd and htdigest files.
Jeremy Hinegardner
MIT