I’m programming a ant task whitch create folders on a FTP linux based server, and i would like to make it generate the .htaccess file and the .htpasswd file.
I need to write passwords in the .htpasswd with the MD5 encryption (or other encryption methods), how i can do that ?
Thanks all 😉
you can call an external executable from your ant file – although that means that it will need to have access to that executable. This may do the trick:
Guaranteed correct format. Otherwise, you can write your own ant task and call it. Java has built-in MD5 libraries, so you would only have to generate the correct password line in java and append it to the password file. That would be more portable.