cvs: phpdoc-es /reference/strings/functions md5.xml
| From: | Javier Eguiluz | Date: | Wed, 29 Jun 2005 17:31:45 +0000 |
| Subject: | cvs: phpdoc-es /reference/strings/functions md5.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-931@lists.php.net to get a copy of this message | ||
javi Wed Jun 29 13:31:45 2005 EDT
Modified files:
/phpdoc-es/reference/strings/functions md5.xml
Log:
- Muchos cambios
- Añadidos ejemplos al final
http://cvs.php.net/diff.php/phpdoc-es/reference/strings/functions/md5.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc-es/reference/strings/functions/md5.xml
diff -u phpdoc-es/reference/strings/functions/md5.xml:1.2
phpdoc-es/reference/strings/functions/md5.xml:1.3
--- phpdoc-es/reference/strings/functions/md5.xml:1.2 Sat Aug 17 09:04:36 2002
+++ phpdoc-es/reference/strings/functions/md5.xml Wed Jun 29 13:31:45 2005
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- splitted from ./es/functions/strings.xml, last change in rev 1.7 -->
-<!-- last change to 'md5' in en/ tree in rev 1.135 -->
+<!-- $Revision: 1.3 $ -->
+<!-- EN-Revision: 1.7 Maintainer: javi Status: ready -->
+<!-- splitted from ./en/functions/strings.xml, last change in rev 1.135 -->
<refentry id="function.md5">
<refnamediv>
<refname>md5</refname>
@@ -10,17 +11,44 @@
<title>Descripción</title>
<methodsynopsis>
<type>string</type><methodname>md5</methodname>
-
<methodparam><type>string</type><parameter>cad</parameter></methodparam>
+
<methodparam><type>string</type><parameter>cadena</parameter></methodparam>
+ <methodparam
choice='opt'><type>bool</type><parameter>modo_binario</parameter></methodparam>
</methodsynopsis>
<para>
- Calcula el hash (extracto) MD5 de <parameter>cad</parameter>
- usaneo el
- <ulink url="&url.rfc;rfc1321.html">Algoritmo de Resumen de
- Mensajes MD5 de RSA Data Security, Inc. </ulink>.
+ Calcula y devuelve el hash (resumen) MD5 de <parameter>cadena</parameter>
+ usando el <ulink url="&url.rfc;rfc1321.html">Algoritmo de Resumen de
+ Mensajes MD5 de RSA Data Security, Inc. </ulink>. El hash devuelto consiste en
+ una cadena de 32 números en formato hexadecimal.
+ Si el valor del parámetro <parameter>modo_binario</parameter> es
&true;,
+ el resumen md5 se devuelto tiene una longitud de 16 y su formato es binario.
+ </para>
+ <note>
+ <simpara>
+ El parámetro opcional <parameter>modo_binario</parameter> se
incluyó en la
+ versión de PHP PHP 5.0.0 y su valor por defecto es &false;
+ </simpara>
+ </note>
+ <para>
+ <example>
+ <title>Ejemplo de <function>md5</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$cadena = 'manzana';
+
+if (md5($cadena) === '81b1c93c5f431703e4c3bfb0274305e0') {
+ echo "¿Quieres una manzana verde o roja?";
+ exit;
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ Vea también <function>crc32</function>,
<function>md5_file</function>
+ y <function>sha1</function>.
</para>
- <para>
- Vea también: <function>crc32</function>
- </para>
</refsect1>
</refentry>