mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-29 04:12:21 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@274154 c90b9560-bf6c-de11-be94-00142212c4b1
138 lines
3.4 KiB
XML
Executable File
138 lines
3.4 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.15 $ -->
|
|
<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.sha1">
|
|
<refnamediv>
|
|
<refname>sha1</refname>
|
|
<refpurpose>Calcule le sha1 d'une chaîne de caractères</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>sha1</methodname>
|
|
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
|
<methodparam choice='opt'><type>bool</type><parameter>raw_output</parameter><initializer>false</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Calcule le sha1 de la chaîne de caractères <parameter>str</parameter> en utilisant
|
|
<link xlink:href="&url.rfc;3174"><literal>US Secure Hash Algorithm 1</literal></link>.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>str</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La chaîne d'entrée.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>raw_output</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Si le paramètre optionnel <parameter>raw_output</parameter>
|
|
est passé à &true;, le sha1 est retourné sous forme binaire brute avec
|
|
une taille de 20 caractères, sinon, il est retourné sous la forme d'un nombre
|
|
hexadécimal d'une taille de 40 caractères. Par défaut, vaut &false;.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne le sha1, sous la forme d'une &string;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.0.0</entry>
|
|
<entry>
|
|
Ajout du paramètre <parameter>raw_output</parameter>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>sha1</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$str = 'pomme';
|
|
|
|
if (sha1($str) === '752c14ea195c460bac3c3b7896975ee9fd15eeb7') {
|
|
echo "Voulez-vous une golden ou une spartan ?";
|
|
exit;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>sha1_file</function></member>
|
|
<member><function>crc32</function></member>
|
|
<member><function>md5</function></member>
|
|
<member><function>hash</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|