On most Linux distros it is possible to generate the htpasswd file entries simply using the htpasswd command line util.

On FreeBSD the easiest way to accomplish the same task is using OpenSSL itself

openssl passwd -apr1 >> /path/to/htpasswd.file

Enter the password twice and the hash will be printed into the file

Then open the file and add the username followed with a : before the hash

It will look like username:password_hash