|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: leonardolara Status: ready --> |
3 | | -<refentry xml:id="function.mcrypt-create-iv" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 2 | +<!-- EN-Revision: 6126b024cb929b12ea29d9676671e4dde342f03d Maintainer: leonardolara Status: ready --> |
| 3 | +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.mcrypt-create-iv"> |
4 | 4 | <refnamediv> |
5 | 5 | <refname>mcrypt_create_iv</refname> |
6 | 6 | <refpurpose>Cria um vetor de inicialização (IV) a partir de uma fonte aleatória</refpurpose> |
|
35 | 35 |
|
36 | 36 | <refsect1 role="parameters"> |
37 | 37 | &reftitle.parameters; |
38 | | - <para> |
39 | | - <variablelist> |
40 | | - <varlistentry> |
41 | | - <term><parameter>size</parameter></term> |
42 | | - <listitem> |
43 | | - <para> |
44 | | - O tamanho do IV. |
45 | | - </para> |
46 | | - </listitem> |
47 | | - </varlistentry> |
48 | | - <varlistentry> |
49 | | - <term><parameter>source</parameter></term> |
50 | | - <listitem> |
51 | | - <para> |
52 | | - A fonte do IV. A fonte pode ser |
53 | | - <constant>MCRYPT_RAND</constant> (gerador de números aleatórios do sistema), |
54 | | - <constant>MCRYPT_DEV_RANDOM</constant> (leitura de dados de |
55 | | - <filename>/dev/random</filename>) e |
56 | | - <constant>MCRYPT_DEV_URANDOM</constant> (leitura de dados de |
57 | | - <filename>/dev/urandom</filename>). Antes da versão 5.3.0, |
58 | | - <constant>MCRYPT_RAND</constant> era o único suportado no Windows. |
59 | | - </para> |
60 | | - <para> |
61 | | - Observe que o valor padrão deste parâmetro era |
62 | | - <constant>MCRYPT_DEV_RANDOM</constant> antes do PHP 5.6.0. |
63 | | - </para> |
64 | | - <note> |
65 | | - <simpara> |
66 | | - Observe que <constant>MCRYPT_DEV_RANDOM</constant> pode bloquear até que mais |
67 | | - entropia esteja disponível. |
68 | | - </simpara> |
69 | | - </note> |
70 | | - </listitem> |
71 | | - </varlistentry> |
72 | | - </variablelist> |
73 | | - </para> |
| 38 | + <variablelist> |
| 39 | + <varlistentry> |
| 40 | + <term><parameter>size</parameter></term> |
| 41 | + <listitem> |
| 42 | + <para> |
| 43 | + O tamanho do IV. |
| 44 | + </para> |
| 45 | + </listitem> |
| 46 | + </varlistentry> |
| 47 | + <varlistentry> |
| 48 | + <term><parameter>source</parameter></term> |
| 49 | + <listitem> |
| 50 | + <para> |
| 51 | + A fonte do IV. A fonte pode ser |
| 52 | + <constant>MCRYPT_RAND</constant> (gerador de números aleatórios do sistema), |
| 53 | + <constant>MCRYPT_DEV_RANDOM</constant> (leitura de dados de |
| 54 | + <filename>/dev/random</filename>) e |
| 55 | + <constant>MCRYPT_DEV_URANDOM</constant> (leitura de dados de |
| 56 | + <filename>/dev/urandom</filename>). Antes da versão 5.3.0, |
| 57 | + <constant>MCRYPT_RAND</constant> era o único suportado no Windows. |
| 58 | + </para> |
| 59 | + <para> |
| 60 | + Observe que o valor padrão deste parâmetro era |
| 61 | + <constant>MCRYPT_DEV_RANDOM</constant> antes do PHP 5.6.0. |
| 62 | + </para> |
| 63 | + <note> |
| 64 | + <simpara> |
| 65 | + Observe que <constant>MCRYPT_DEV_RANDOM</constant> pode bloquear até que mais |
| 66 | + entropia esteja disponível. |
| 67 | + </simpara> |
| 68 | + </note> |
| 69 | + </listitem> |
| 70 | + </varlistentry> |
| 71 | + </variablelist> |
74 | 72 | </refsect1> |
75 | 73 |
|
76 | 74 | <refsect1 role="returnvalues"> |
|
82 | 80 |
|
83 | 81 | <refsect1 role="examples"> |
84 | 82 | &reftitle.examples; |
85 | | - <para> |
86 | | - <example> |
87 | | - <title>Exemplo de <function>mcrypt_create_iv</function></title> |
88 | | - <programlisting role="php"> |
| 83 | + <example> |
| 84 | + <title>Exemplo de <function>mcrypt_create_iv</function></title> |
| 85 | + <programlisting role="php"> |
89 | 86 | <![CDATA[ |
90 | 87 | <?php |
91 | 88 | $size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_CFB); |
92 | 89 | $iv = mcrypt_create_iv($size, MCRYPT_DEV_RANDOM); |
93 | 90 | ?> |
94 | 91 | ]]> |
95 | | - </programlisting> |
96 | | - </example> |
97 | | - </para> |
| 92 | + </programlisting> |
| 93 | + </example> |
98 | 94 | </refsect1> |
99 | 95 |
|
100 | 96 | <refsect1 role="seealso"> |
101 | 97 | &reftitle.seealso; |
102 | | - <para> |
103 | | - <simplelist> |
104 | | - <member><link xlink:href="&url.mcrypt.iv;">&url.mcrypt.iv;</link></member> |
105 | | - <member><link xlink:href="&url.mcrypt.bcm;">&url.mcrypt.bcm;</link></member> |
106 | | - <member>Capítulo 9.3 de &book.applied.cryptography;</member> |
107 | | - <member><function>random_bytes</function></member> |
108 | | - </simplelist> |
109 | | - </para> |
| 98 | + <simplelist> |
| 99 | + <member><link xlink:href="&url.mcrypt.iv;">&url.mcrypt.iv;</link></member> |
| 100 | + <member><link xlink:href="&url.mcrypt.bcm;">&url.mcrypt.bcm;</link></member> |
| 101 | + <member>Capítulo 9.3 de &book.applied.cryptography;</member> |
| 102 | + <member><function>random_bytes</function></member> |
| 103 | + </simplelist> |
110 | 104 | </refsect1> |
111 | 105 | </refentry> |
112 | | - |
113 | 106 | <!-- Keep this comment at the end of the file |
114 | 107 | Local variables: |
115 | 108 | mode: sgml |
|
0 commit comments