cvs: phpdoc-da /reference/strings/functions sha1.xml
[email protected] ("Jonathan Holst") Mon, 04 Oct 2004 19:17:37 -0000
| Newsgroups | php.doc.da |
|---|---|
| Message-ID | <cvsholst1096917457@cvsserver> |
holst Mon Oct 4 15:17:37 2004 EDT
Added files:
/phpdoc-da/reference/strings/functions sha1.xml
Log:
Initial translation
http://cvs.php.net/co.php/phpdoc-da/reference/strings/functions/sha1.xml?r=1.1&p=1
Index: phpdoc-da/reference/strings/functions/sha1.xml
+++ phpdoc-da/reference/strings/functions/sha1.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.7 Maintainer: holst Status: ready -->
<refentry id="function.sha1">
<refnamediv>
<refname>sha1</refname>
<refpurpose>Beregn sha1-hashen af en streng</refpurpose>
</refnamediv>
<refsect1>
<title>Beskrivelse</title>
<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></methodparam>
</methodsynopsis>
<simpara>
Beregner sha1-hashen af <parameter>str</parameter> ved hjælp af <ulink
url="&url.rfc;3174">US Secure Hash Algorithm 1</ulink>, og returnerer den
hash. Hashen er et 40-tegns hexadecimalt tal. Hvis den valgfrie
<parameter>raw_output</parameter> er sat til &true;, så vil
sha1-sammendraget i stedet returnere den i rå binær form med en længde på
20 tegn.
</simpara>
<note>
<simpara>
Den valgfrie <parameter>raw_output</parameter> blev tilføjet i PHP 5.0.0
og er som standard &false;.
</simpara>
</note>
<para>
<example>
<title>Et <function>sha1</function> eksempel</title>
<programlisting role="php">
<![CDATA[
<?php
$str = 'æble';
if (sha1($str) === '90be45da8ebe584fc73a4c5fe19d8dfe79a4960f') {
echo "Vil du have et grønt eller et rødt æble?";
exit;
}
?>
]]>
</programlisting>
</example>
</para>
<simpara>
Se også <function>sha1_file</function>,
<function>crc32</function> og
<function>md5</function>
</simpara>
</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
-->