|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<!-- $Revision$ --> |
3 | | -<!-- EN-Revision: 7fa66b6c0b15efc7e1d5ef0f5f01280c73f981f9 Maintainer: seros Status: ready --> |
| 2 | +<!-- EN-Revision: 4d17b7b4947e7819ff5036715dd706be87ae4def Maintainer: seros Status: ready --> |
4 | 3 | <!-- Reviewed: no --> |
5 | | - |
6 | 4 | <reference xml:id="class.sessionhandler" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> |
7 | | - |
| 5 | + |
8 | 6 | <title>La clase SessionHandler</title> |
9 | 7 | <titleabbrev>SessionHandler</titleabbrev> |
10 | | - |
| 8 | + |
11 | 9 | <partintro> |
12 | | - |
| 10 | + |
13 | 11 | <!-- {{{ SessionHandler intro --> |
14 | 12 | <section xml:id="sessionhandler.intro"> |
15 | 13 | &reftitle.intro; |
|
59 | 57 | </para> |
60 | 58 | </section> |
61 | 59 | <!-- }}} --> |
62 | | - |
| 60 | + |
63 | 61 | <section xml:id="sessionhandler.synopsis"> |
64 | 62 | &reftitle.classsynopsis; |
65 | | - |
| 63 | + |
66 | 64 | <!-- {{{ Synopsis --> |
67 | | - <classsynopsis> |
68 | | - <ooclass><classname>SessionHandler</classname></ooclass> |
69 | | - |
70 | | - <!-- {{{ Class synopsis --> |
71 | | - <classsynopsisinfo> |
72 | | - <ooclass> |
73 | | - <classname>SessionHandler</classname> |
74 | | - </ooclass> |
75 | | - |
76 | | - <oointerface> |
77 | | - <interfacename>SessionHandlerInterface</interfacename> |
78 | | - </oointerface> |
79 | | - </classsynopsisinfo> |
80 | | - <!-- }}} --> |
81 | | - |
| 65 | + <classsynopsis class="class"> |
| 66 | + <ooclass> |
| 67 | + <classname>SessionHandler</classname> |
| 68 | + </ooclass> |
| 69 | + |
| 70 | + <oointerface> |
| 71 | + <modifier>implements</modifier> |
| 72 | + <interfacename>SessionHandlerInterface</interfacename> |
| 73 | + </oointerface> |
| 74 | + |
| 75 | + <oointerface> |
| 76 | + <interfacename>SessionIdInterface</interfacename> |
| 77 | + </oointerface> |
| 78 | + |
82 | 79 | <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> |
83 | | - <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.sessionhandler')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> |
| 80 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.sessionhandler')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='SessionHandler'])"> |
| 81 | + <xi:fallback/> |
| 82 | + </xi:include> |
84 | 83 | </classsynopsis> |
85 | 84 | <!-- }}} --> |
86 | | - |
| 85 | + |
87 | 86 | </section> |
88 | | - |
| 87 | + |
89 | 88 | <section xml:id="session.notes"> |
| 89 | + &reftitle.notes; |
90 | 90 | <warning> |
91 | 91 | <para> |
92 | 92 | Esta clase está diseñada para exponer el gestor de almacenamiento de sesiones interno de PHP, si quiere |
|
95 | 95 | </para> |
96 | 96 | </warning> |
97 | 97 | </section> |
98 | | - |
99 | | - <section role="changelog" xml:id="sessionhandler.changelog"><!-- {{{ --> |
100 | | - &reftitle.changelog; |
101 | | - <para> |
102 | | - <informaltable> |
103 | | - <tgroup cols="2"> |
104 | | - <thead> |
105 | | - <row> |
106 | | - <entry>&Version;</entry> |
107 | | - <entry>&Description;</entry> |
108 | | - </row> |
109 | | - </thead> |
110 | | - <tbody> |
111 | | - <row> |
112 | | - <entry>5.5.1</entry> |
113 | | - <entry> |
114 | | - Se añadió <function>SessionHandler::create_sid</function>. |
115 | | - </entry> |
116 | | - </row> |
117 | | - </tbody> |
118 | | - </tgroup> |
119 | | - </informaltable> |
120 | | - </para> |
121 | | - </section><!-- }}} --> |
122 | | - |
| 98 | + |
123 | 99 | <section xml:id="sessionhandler.examples"> |
| 100 | + &reftitle.examples; |
124 | 101 | <example> |
125 | 102 | <title> |
126 | 103 | Usar <classname>SessionHandler</classname> para añadir encriptación a los gestores de almacenamiento internos de PHP. |
@@ -164,8 +141,8 @@ function decrypt($edata, $password) { |
164 | 141 | * @return base64 encrypted data |
165 | 142 | */ |
166 | 143 | function encrypt($data, $password) { |
167 | | - // Set a random salt |
168 | | - $salt = openssl_random_pseudo_bytes(16); |
| 144 | + // Generate a cryptographically secure random salt using random_bytes() |
| 145 | + $salt = random_bytes(16); |
169 | 146 |
|
170 | 147 | $salted = ''; |
171 | 148 | $dx = ''; |
@@ -233,13 +210,12 @@ session_start(); |
233 | 210 | </para> |
234 | 211 | </note> |
235 | 212 | </section> |
236 | | - |
| 213 | + |
237 | 214 | </partintro> |
238 | | - |
| 215 | + |
239 | 216 | &reference.session.entities.sessionhandler; |
240 | | - |
241 | | -</reference> |
242 | 217 |
|
| 218 | +</reference> |
243 | 219 | <!-- Keep this comment at the end of the file |
244 | 220 | Local variables: |
245 | 221 | mode: sgml |
|
0 commit comments