on Apache's docs site:
http://httpd.apache.org/docs/2.2/misc/password_encryptions.html#digest
They say that the hash of the password used for Digest Authentication
created with the htdigest
utility:
$ htdigest -c ./.htdigest "A Realm" user
Adding password for user in realm A Realm.
New password:
Re-type new password:
$ cat ./.htdigest
user:A Realm:879af2190fce9012039001fecbb23412
879af2190fce9012039001fecbb23412 = md5(user:A Realm:password). However, if I type:
$ echo "user:A Realm:password" | md5sum
e77ed25bc7d1fe5ffe9f827346b2cd7b -
I get another hash, which is not the one inside ./.htdigest
.
How then Apache computes the MD5 hash inside ./.htdigest
when I create the file with htdigest
?