svn: /phpdoc/ja/trunk/reference/hash/ functions/hash-hkdf.xml functions/hash-hmac-algos.xml hashcontext/construct.xml hashcontext.xml
[email protected] (Yoshinari Takaoka)
| Newsgroups | php.doc.ja |
|---|---|
| Message-ID | <[email protected]> |
mumumu Fri, 24 Jan 2020 13:17:08 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=349003
Log:
added missing hash related doc translations
Changed paths:
A phpdoc/ja/trunk/reference/hash/functions/hash-hkdf.xml
A phpdoc/ja/trunk/reference/hash/functions/hash-hmac-algos.xml
A phpdoc/ja/trunk/reference/hash/hashcontext/
A phpdoc/ja/trunk/reference/hash/hashcontext/construct.xml
A phpdoc/ja/trunk/reference/hash/hashcontext.xml
svn-diffs-349003.txt
(text/x-diff, 14.5 KB)
Added: phpdoc/ja/trunk/reference/hash/functions/hash-hkdf.xml
===================================================================
--- phpdoc/ja/trunk/reference/hash/functions/hash-hkdf.xml (rev 0)
+++ phpdoc/ja/trunk/reference/hash/functions/hash-hkdf.xml 2020-01-24 13:17:08 UTC (rev 349003)
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 342645 Maintainer: mumumu Status: ready -->
+<refentry xml:id="function.hash-hkdf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>hash_hkdf</refname>
+ <refpurpose>与えられたキーから導出されるHKDFキーを生成する</refpurpose>
+ </refnamediv>
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>string</type><methodname>hash_hkdf</methodname>
+ <methodparam><type>string</type><parameter>algo</parameter></methodparam>
+ <methodparam><type>string</type><parameter>ikm</parameter></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>info</parameter><initializer>''</initializer></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>salt</parameter><initializer>''</initializer></methodparam>
+ </methodsynopsis>
+
+ </refsect1>
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>algo</parameter></term>
+ <listitem>
+ <para>
+ 選択したハッシュアルゴリズムの名前 (例. "sha256", "sha512", "haval160,4" など)
+ サポートされているアルゴリズムの一覧は <function>hash_algos</function> を参照してください。
+ <note>
+ <para>
+ 暗号に適さないハッシュ関数は許可されません。
+ </para>
+ </note>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>ikm</parameter></term>
+ <listitem>
+ <para>
+ 入力キー (生のバイナリ)。
+ 空ではいけません。
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>length</parameter></term>
+ <listitem>
+ <para>
+ 出力の長さをバイト単位で指定します。
+ 選んだハッシュ関数のサイズの255倍以下でなければなりません。
+ </para>
+ <para>
+ <parameter>length</parameter> が <literal>0</literal> の場合、
+ 出力の長さはハッシュ関数が選んだデフォルトのサイズになります。
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>info</parameter></term>
+ <listitem>
+ <para>
+ アプリケーション/コンテキスト依存の情報を示す文字列
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>salt</parameter></term>
+ <listitem>
+ <para>
+ 導出の間に使うソルト
+ </para>
+ <para>
+ この値はオプションですが、
+ ランダムなソルトを追加するとHKDFの強度が飛躍的に向上します。
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ 導出されたキーの生バイナリ表現の文字列を返します(この値は、
+ 出力キーマテリアル(OKM) としても知られています)。
+ 失敗時には &false; を返します。
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ <parameter>ikm</parameter> が空の場合だったり、
+ <parameter>algo</parameter> が未知だったり/暗号に適さなかったり、
+ <parameter>length</parameter> が0より小さいか大きすぎる
+ (ハッシュ関数のサイズの255倍より大きい)場合、
+ <constant>E_WARNING</constant> が発生します。
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>hash_hkdf</function> の例</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// ランダムなキーと、導出するキーを強力にするためのソルトを生成します。
+$inputKey = random_bytes(32);
+$salt = random_bytes(16);
+
+// 上で生成した同じ入力を使い、異なるキーのペアを導出します。
+$encryptionKey = hash_hkdf('sha256', $inputKey, 32, 'aes-256-encryption', $salt);
+$authenticationKey = hash_hkdf('sha256', $inputKey, 32, 'sha-256-authentication', $salt);
+
+var_dump($encryptionKey !== $authenticationKey); // bool(true)
+?>
+]]>
+ </programlisting>
+ <para>
+ 上の例は、AES-256 encryption と SHA-256 authentication をそれぞれ使い、
+ encrypt-then-HMAC を生成する用途に合った、
+ 異なるキーペアを生成します。
+ </para>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>hash_pbkdf2</function></member>
+ <member><link xlink:href="&url.rfc;5869">RFC 5869</link></member>
+ <member><link xlink:href="&url.git.hub;narfbg/hash_hkdf_compat">userland implementation</link></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
+-->
Property changes on: phpdoc/ja/trunk/reference/hash/functions/hash-hkdf.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ja/trunk/reference/hash/functions/hash-hmac-algos.xml
===================================================================
--- phpdoc/ja/trunk/reference/hash/functions/hash-hmac-algos.xml (rev 0)
+++ phpdoc/ja/trunk/reference/hash/functions/hash-hmac-algos.xml 2020-01-24 13:17:08 UTC (rev 349003)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 343152 Maintainer: mumumu Status: ready -->
+
+<refentry xml:id="function.hash-hmac-algos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>hash_hmac_algos</refname>
+ <refpurpose>hash_hmac に合うハッシュアルゴリズムの一覧を返す</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description"><!-- {{{ -->
+ &reftitle.description;
+ <methodsynopsis role="procedural">
+ <type>array</type><methodname>hash_hmac_algos</methodname>
+ <void />
+ </methodsynopsis>
+ </refsect1><!-- }}} -->
+
+ <refsect1 role="returnvalues"><!-- {{{ -->
+ &reftitle.returnvalues;
+ <para>
+ 数値インデックスをキーとし、
+ <function>hash_hmac</function> に合う、
+ サポートされたハッシュアルゴリズムの一覧を値とした配列を返します。
+ </para>
+ </refsect1><!-- }}} -->
+
+ <refsect1 role="examples"><!-- {{{ -->
+ &reftitle.examples;
+ <example xml:id="hash-hmac-algos.example.basic"><!-- {{{ -->
+ <title><function>hash_hmac_algos</function> の例</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+print_r(hash_hmac_algos());
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Array
+(
+ [0] => md2
+ [1] => md4
+ [2] => md5
+ [3] => sha1
+ [4] => sha224
+ [5] => sha256
+ [6] => sha384
+ [7] => sha512/224
+ [8] => sha512/256
+ [9] => sha512
+ [10] => sha3-224
+ [11] => sha3-256
+ [12] => sha3-384
+ [13] => sha3-512
+ [14] => ripemd128
+ [15] => ripemd160
+ [16] => ripemd256
+ [17] => ripemd320
+ [18] => whirlpool
+ [19] => tiger128,3
+ [20] => tiger160,3
+ [21] => tiger192,3
+ [22] => tiger128,4
+ [23] => tiger160,4
+ [24] => tiger192,4
+ [25] => snefru
+ [26] => snefru256
+ [27] => gost
+ [28] => gost-crypto
+ [29] => haval128,3
+ [30] => haval160,3
+ [31] => haval192,3
+ [32] => haval224,3
+ [33] => haval256,3
+ [34] => haval128,4
+ [35] => haval160,4
+ [36] => haval192,4
+ [37] => haval224,4
+ [38] => haval256,4
+ [39] => haval128,5
+ [40] => haval160,5
+ [41] => haval192,5
+ [42] => haval224,5
+ [43] => haval256,5
+)
+]]>
+ </screen>
+ </example><!-- }}} -->
+ </refsect1><!-- }}} -->
+
+ <refsect1 role="notes"><!-- {{{ -->
+ &reftitle.notes;
+ <note>
+ <para>
+ PHP 7.2.0 より前のバージョンでは、
+ サポートされたハッシュアルゴリズムの一覧を取得する唯一の手段は、
+ <function>hash_hmac</function> に合わないアルゴリズムも返してしまう
+ <function>hash_algos</function> を呼び出すことでした。
+ </para>
+ </note>
+ </refsect1><!-- }}} -->
+
+ <refsect1 role="seealso"><!-- {{{ -->
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>hash_hmac</function></member>
+ <member><function>hash_algos</function></member>
+ </simplelist>
+ </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
+-->
Property changes on: phpdoc/ja/trunk/reference/hash/functions/hash-hmac-algos.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ja/trunk/reference/hash/hashcontext/construct.xml
===================================================================
--- phpdoc/ja/trunk/reference/hash/hashcontext/construct.xml (rev 0)
+++ phpdoc/ja/trunk/reference/hash/hashcontext/construct.xml 2020-01-24 13:17:08 UTC (rev 349003)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 344522 Maintainer: mumumu Status: ready -->
+
+<refentry xml:id="hashcontext.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>HashContext::__construct</refname>
+ <refpurpose>private なコンストラクタのため、直接インスタンス化できません</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <constructorsynopsis>
+ <modifier>private</modifier> <methodname>HashContext::__construct</methodname>
+ <void />
+ </constructorsynopsis>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </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
+-->
Property changes on: phpdoc/ja/trunk/reference/hash/hashcontext/construct.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ja/trunk/reference/hash/hashcontext.xml
===================================================================
--- phpdoc/ja/trunk/reference/hash/hashcontext.xml (rev 0)
+++ phpdoc/ja/trunk/reference/hash/hashcontext.xml 2020-01-24 13:17:08 UTC (rev 349003)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 344522 Maintainer: mumumu Status: ready -->
+
+<phpdoc:classref xml:id="class.hashcontext" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <title>HashContext クラス</title>
+ <titleabbrev>HashContext</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ HashContext intro -->
+ <section xml:id="hashcontext.intro">
+ &reftitle.intro;
+ <para>
+
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="hashcontext.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>HashContext</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>HashContext</classname>
+ </ooclass>
+ </classsynopsisinfo>
+<!-- }}} -->
+
+ <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.hashcontext')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis)" />
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+ </partintro>
+
+ &reference.hash.entities.hashcontext;
+
+</phpdoc:classref>
+
+<!-- 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
+-->
Property changes on: phpdoc/ja/trunk/reference/hash/hashcontext.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property