Encryption method of htpasswd and TWiki

I would like to know how the password are encrypted into .htpasswd file. I installed TWiki, and the generated passwords by TWiki system are not the same that those of Dreamhost (by default, TWiki uses ‘crypt’ method but I don’t know exactly which method (mda5, sha1 …). So authentication fails …
Thanks you very much.