mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-24 00:58:12 +02:00
7a1d9453e9
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@167786 c90b9560-bf6c-de11-be94-00142212c4b1
77 lines
2.0 KiB
XML
77 lines
2.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.10 $ -->
|
|
<!-- EN-Revision: 1.7 Maintainer: didou Status: ready -->
|
|
<refentry id="function.md5">
|
|
<refnamediv>
|
|
<refname>md5</refname>
|
|
<refpurpose>Calcule le md5 d'une chaîne</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>md5</methodname>
|
|
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
|
<methodparam choice='opt'><type>bool</type><parameter>raw_output</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<methodname>md5</methodname> calcule le MD5 de la
|
|
chaîne de caractères <parameter>str</parameter> en utilisant
|
|
l'algorithme
|
|
<ulink url="&url.rfc;1321"><literal>RSA Data Security, Inc.
|
|
MD5 Message-Digest Algorithm</literal></ulink>,
|
|
et retourne le résultat.
|
|
Le résultat est un nombre de 32 caractères hexadécimaux.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
Le paramètre <parameter>raw_output</parameter> a été ajouté en
|
|
&php; 5.0.0 et vaut par défaut &false;.
|
|
</simpara>
|
|
</note>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>md5</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$str = 'pomme';
|
|
|
|
if (md5($str) === 'ede0f9c3a1d2093e3f48fcafd3c70915') {
|
|
echo "Voulez-vous une golden ou une spartan?";
|
|
exit;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<function>crc32</function>,
|
|
<function>md5_file</function> et
|
|
<function>sha1</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|