Programmatically building htpasswd

.httpasswd files are just text files with a specific format depending on the hash function specified. If you are using MD5 they look like this: foo:$apr1$y1cXxW5l$3vapv2yyCXaYz8zGoXj241 That’s the login, a colon, ,$apr1$, the salt and 1000 times md5 encoded as base64. If you select SHA1 they look like this: foo:{SHA}BW6v589SIg3i3zaEW47RcMZ+I+M= That’s the login, a colon, … Read more