jan Sun Nov 25 14:44:52 2001 EDT
Modified files:
/phpdoc/de/functions mhash.xml
Log:
synced with revision 1.19
Index: phpdoc/de/functions/mhash.xml
diff -u phpdoc/de/functions/mhash.xml:1.7 phpdoc/de/functions/mhash.xml:1.8
--- phpdoc/de/functions/mhash.xml:1.7 Wed Nov 14 17:07:52 2001
+++ phpdoc/de/functions/mhash.xml Sun Nov 25 14:44:52 2001
@@ -25,21 +25,30 @@
</para>
<para>
<example>
- <title>Berechne den SHA1 Schl�ssel und gib es als Hex aus</title>
+ <title>Berechne den MD5 Extrakt und gib es als Hex aus</title>
<programlisting role="php">
-<?php
-$input = "Lass uns um 9 Uhr an einem geheimen Ort treffen.";
-$hash = mhash(MHASH_SHA1, $input);
-
-print "Der Hash ist " . bin2hex($hash)."\n";
-
-?>
+<![CDATA[
+<?php
+$input = "what do ya want for nothing?";
+$hash = mhash (MHASH_MD5, $input);
+print "Der Hash ist ".bin2hex ($hash)."\n<br>";
+$hash = mhash (MHASH_MD5, $input, "Jefe");
+print "Der hmac ist ".bin2hex ($hash)."\n<br>";
+?>
+]]>
</programlisting>
- </example>
- Die Ausgabe ist:
- <programlisting>
-Der Hash ist d3b85d710d8f6e4e5efd4d5e67d041f9cecedafe
- </programlisting>
+ <para>
+ Die Ausgabe ist:
+ <screen>
+<![CDATA[
+Der Hash ist d03cb659cbf9192dcd066272249f8412
+Der hmac ist 750c783e6ab0b503eaa86e310a5db738
+]]>
+ </screen>
+ </para>
+ </example>
+
+
Eine komplette Liste aller unterst�tzen Hashes ist in der
Dokumentation von Mhash enthalten. Die allgemeine Verwendung ist,
dass man einen Hash Algorithmus von PHP mit MHASH_HASHNAME
@@ -132,18 +141,24 @@
<example>
<title>Mhash_get_hash_name Beispiel</title>
<programlisting role="php">
-<?php
+<![CDATA[
+<?php
$hash = MHASH_MD5;
print mhash_get_hash_name ($hash);
-?>
+?>
+]]>
</programlisting>
- </example>
+ <para>
Das Beispiel oben gibt aus:
- <programlisting>
+ <screen>
+<![CDATA[
MD5
- </programlisting>
- </para>
+]]>
+ </screen>
+ </para>
+ </example>
+ </para>
</refsect1>
</refentry>
@@ -195,16 +210,18 @@
<example>
<title>Alle Hashes durchlaufen</title>
<programlisting role="php">
-<?php
+<![CDATA[
+<?php
$nr = mhash_count();
-for ($i = 0; $i <= $nr; $i++) {
- echo sprintf ("Die Blockgr�sse von %s ist %d\n",
- mhash_get_hash_name ($i),
- mhash_get_block_size ($i));
+for ($i = 0; $i <= $nr; $i++) {
+ echo sprintf ("Die Blockgr�sse von %s ist %d\n",
+ mhash_get_hash_name ($i),
+ mhash_get_block_size ($i));
}
-?>
+?>
+]]>
</programlisting>
</example>
</para>
@@ -251,4 +268,4 @@
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
--->
\ No newline at end of file
+-->