Simple PHP implementation for htpasswd