note 101087 added to function.sha1
| From: | rich dot sage at gmail dot com | Date: | Thu, 25 Nov 2010 08:59:17 +0000 |
| Subject: | note 101087 added to function.sha1 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174346@lists.php.net to get a copy of this message | ||
If you're using Dovecot for mail retrieval and you want to generate SHA1 passwords yourself,
you'll need to set the raw_output value to true, then base64_encode the output:
<?php
function makeDovecotPassword($input)
{
return '{SHA}' . base64_encode(sha1($input, true));
}
?>
----
Server IP: 109.169.40.147
Probable Submitter: 188.222.200.235
----
Manual Page -- http://www.php.net/manual/en/function.sha1.php
Edit -- https://master.php.net/note/edit/101087
Del: integrated -- https://master.php.net/note/delete/101087/integrated
Del: useless -- https://master.php.net/note/delete/101087/useless
Del: bad code -- https://master.php.net/note/delete/101087/bad+code
Del: spam -- https://master.php.net/note/delete/101087/spam
Del: non-english -- https://master.php.net/note/delete/101087/non-english
Del: in docs -- https://master.php.net/note/delete/101087/in+docs
Del: other reasons-- https://master.php.net/note/delete/101087
Reject -- https://master.php.net/note/reject/101087
Search -- https://master.php.net/manage/user-notes.php