mirror of
https://github.com/php/doc-de.git
synced 2026-03-23 23:02:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@312940 c90b9560-bf6c-de11-be94-00142212c4b1
65 lines
1.6 KiB
XML
65 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: hholzgra Status: ready -->
|
|
|
|
<appendix xml:id="crack.examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
Diese Beispiel zeigt, wie ein CrackLib Wörterbuch geöffnet wird,
|
|
ein übergebenes Passwort überprüft wird und Diagnosemeldungen
|
|
ausgewertet werden. Anschließend wird das Wörterbuch wieder
|
|
geschlossen.
|
|
<example>
|
|
<title>CrackLib Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Öffne das CrackLib Wörterbuch
|
|
$dictionary = crack_opendict('/usr/local/lib/pw_dict')
|
|
or die('Kann das CrackLib Wörterbuch nicht öffnen');
|
|
|
|
// Führe eine Überprüfung des Passworts durch
|
|
$check = crack_check($dictionary, 'gx9A2s0x');
|
|
|
|
// Empfange Rückmeldungen
|
|
$diag = crack_getlastmessage();
|
|
echo $diag; // 'starkes Passwort'
|
|
|
|
// Schliesse das Wörterbuch
|
|
crack_closedict($dictionary);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Wenn <function>crack_check</function> &true; zurückliefert, wird
|
|
<function>crack_getlastmessage</function>
|
|
<literal>'strong password'</literal> zurückliefern.
|
|
</para>
|
|
</note>
|
|
</appendix>
|
|
|
|
<!-- 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
|
|
-->
|
|
|