jeudi 21 juillet 2016

Create users for PROFTPD with PHP

I am following the guide to use MySQL to create users in proFTPd. To encrypt passwords, the guide uses the following command:

/bin/echo "{md5}"`/bin/echo -n "password" | openssl dgst -binary -md5 | openssl enc -base64`

I wander how I would do this in PHP? I have googled this but I can't figure out how to implement this command in PHP. Is it just the MD5 hash of the base64 encoded form of the password?

Aucun commentaire:

Enregistrer un commentaire