[php(?)] .htpasswd encription

Pagina: 1
Acties:

  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
kan je met php je wachtwoord encripten zodat je hem in je .htpasswd kan zetten? ik heb al op andere sites gezocht, maar ik kan het nergens vinden.

2 swim or not 2 swim, that's the question


  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
lama, denk dat ik het al weet

2 swim or not 2 swim, that's the question


  • Soef
  • Registratie: Februari 2001
  • Laatst online: 03-02-2023

Soef

-Soef^IO-

Op zaterdag 12 januari 2002 11:31 schreef aqua_man het volgende:
lama, denk dat ik het al weet
MD5?? zeg ff, ik wil het ook wel weten :)

Some things can not happen until they happen...


  • ACM
  • Registratie: Januari 2000
  • Niet online

ACM

Software Architect

Werkt hier

Op zaterdag 12 januari 2002 11:46 schreef Soef het volgende:
MD5?? zeg ff, ik wil het ook wel weten :)
man htpasswd (of htpasswd --help ofzo) zal je vertellen dat er crypt gebruikt wordt als default.

Gewoon plain-old unix-crypt dus ;)

  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
Op zaterdag 12 januari 2002 11:46 schreef Soef het volgende:

[..]

MD5?? zeg ff, ik wil het ook wel weten :)
PHP:
1
2
3
4
<?
$password = crypt("$password");
echo "$name:$password";
?>

je krijgt dan bijvoorbeeld: test:4hph/tmMGeKzM

2 swim or not 2 swim, that's the question


  • Orphix
  • Registratie: Februari 2000
  • Niet online
Uit de PHP manual:
Please note, this function is not supported at every webserver (e.g
PHPTriad PHP 4.0) But the function MD5 is wildly supported and also leaves
no room for error. So my advice: don't use this function but use MD5
instead.
Maar helaas heb ik hier slechte ervaringen mee, zowel de crypt() als md5() werden of niet door mijn bsd-powered apache of niet door mijn win2000-powered apache gepakt. (Ik heb de htpasswd utility (programma) moeten gebruiken)
Pagina: 1