0
.htpasswd generator
Explorer
,
/t5/coldfusion-discussions/htpasswd-generator/td-p/1053584
Sep 28, 2006
Sep 28, 2006
Copy link to clipboard
Copied
Hello All,
I was woundering if any one could point me in the correct direction, how would you go about encrypting passwords using coldfusion to work in the .htaccess .htpasswd format used commonly with apachie web servers.
I have the script for it on my PHP server but am woundering how to do it with a cold fussion page
PHP script below
<?php
// Password to be encrypted for a .htpasswd file
$clearTextPassword = 'passwordhere';
// Encrypt password
$password = crypt($clearTextPassword, base64_encode($clearTextPassword));
// Print encrypted password
echo $password;
?>
I understand whats going on here just am not sure how to do the same thing in coldfussion, sorry my coldfussion knoledge is patchy.
Kind Regards Guy
I was woundering if any one could point me in the correct direction, how would you go about encrypting passwords using coldfusion to work in the .htaccess .htpasswd format used commonly with apachie web servers.
I have the script for it on my PHP server but am woundering how to do it with a cold fussion page
PHP script below
<?php
// Password to be encrypted for a .htpasswd file
$clearTextPassword = 'passwordhere';
// Encrypt password
$password = crypt($clearTextPassword, base64_encode($clearTextPassword));
// Print encrypted password
echo $password;
?>
I understand whats going on here just am not sure how to do the same thing in coldfussion, sorry my coldfussion knoledge is patchy.
Kind Regards Guy
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/coldfusion-discussions/htpasswd-generator/m-p/1053585#M94962
Sep 28, 2006
Sep 28, 2006
Copy link to clipboard
Copied
The
hash
() function provides superior security.
Question: Do you need to interoperate with a php system or generate hashes that are identical to the php code posted?
That could get tricky because crypt uses unix DES for the default hash.
Question: Do you need to interoperate with a php system or generate hashes that are identical to the php code posted?
That could get tricky because crypt uses unix DES for the default hash.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/coldfusion-discussions/htpasswd-generator/m-p/1053586#M94963
Oct 02, 2006
Oct 02, 2006
Copy link to clipboard
Copied
not sure about replicating it, but it you're using a linux
server you can always rely in the htpasswd binary. See attached
code.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

