mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@351916 c90b9560-bf6c-de11-be94-00142212c4b1
117 lines
3.1 KiB
XML
Executable File
117 lines
3.1 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: e095023e408c8cb6378ae16bb6870343a3946919 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>
|
|
|
|
<refsynopsisdiv>
|
|
&warn.passwordhashing;
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>sha1</methodname>
|
|
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
|
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Calcule le sha1 de la chaîne de caractères <parameter>string</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>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La chaîne d'entrée.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>binary</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Si le paramètre optionnel <parameter>binary</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.
|
|
</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="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 ?";
|
|
}
|
|
?>
|
|
]]>
|
|
</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>
|
|
<member><function>crypt</function></member>
|
|
<member><function>password_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:"~/.phpdoc/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
|
|
-->
|