{"id":269787,"date":"2015-12-07T16:39:02","date_gmt":"2015-12-07T13:39:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269787"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269787","title":{"rendered":"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c \u0432 PHP7 \u2013 \u041f\u043e\u0432\u0435\u0437\u0435\u0442 \u043b\u0438 \u043c\u043d\u0435?"},"content":{"rendered":"<p>       <img decoding=\"async\" width=\"100%\" src=\"https:\/\/habrastorage.org\/files\/dd7\/176\/96c\/dd717696cc1a4dc69497bb7d06734f94.jpg\" alt=\"\u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 PHP\" title=\"\u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 PHP\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. PHP5 \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0440\u0438\u043f\u0442\u043e\u0441\u0442\u043e\u0439\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a PHP7 \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0443\u0442\u0435\u043c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8_%D1%81%D1%82%D0%BE%D0%B9%D0%BA%D0%B8%D0%B9_%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80_%D0%BF%D1%81%D0%B5%D0%B2%D0%B4%D0%BE%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB\">CSPRNG<\/a>-\u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 CSPRNG?<\/h2>\n<p>  \u0426\u0438\u0442\u0438\u0440\u0443\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8_%D1%81%D1%82%D0%BE%D0%B9%D0%BA%D0%B8%D0%B9_%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80_%D0%BF%D1%81%D0%B5%D0%B2%D0%B4%D0%BE%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB\">\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e<\/a>, \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u043e\u0439\u043a\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0430\u043d\u0433\u043b. Cryptographically secure pseudorandom number generator, CSPRNG) \u2014 \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438.<\/p>\n<p>  CSPRNG \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:  <\/p>\n<ul>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f public\/private \u043a\u043b\u044e\u0447\u0435\u0439)<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>CSPRNG \u0432 PHP7<\/h2>\n<p>  PHP7 \u0432\u0432\u043e\u0434\u0438\u0442 \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f CSPRNG: <a href=\"http:\/\/php.net\/manual\/en\/function.random-bytes.php\"><code>random_bytes<\/code><\/a> \u0438 <a href=\"http:\/\/php.net\/manual\/en\/function.random-int.php\"><code>random_int<\/code><\/a>.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>random_bytes<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>int<\/code>, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0434\u043b\u0438\u043d\u0443 (\u0432 \u0431\u0430\u0439\u0442\u0430\u0445) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"php\">$bytes = random_bytes('10'); var_dump(bin2hex($bytes)); \/\/possible ouput: string(20) &quot;7dfab0af960d359388e6&quot;   <\/code><\/pre>\n<p>  <code>random_int<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435:<\/p>\n<pre><code class=\"php\">var_dump(random_int(1, 100)); \/\/possible output: 27 <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430 \u043a\u0430\u0434\u0440\u043e\u043c<\/h2>\n<p>  \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0440\u0435\u0434\u044b:  <\/p>\n<ul>\n<li>\u0412 Windows \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <code>CryptGenRandom();<\/code><\/li>\n<li>\u041d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u2014 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0430 <a href=\"http:\/\/www.openbsd.org\/cgi-bin\/man.cgi\/OpenBSD-current\/man3\/arc4random.3\"><code>arc4random_buf()<\/code><\/a> (\u0432\u0435\u0440\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 BSD-\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u0441 <code>libbsd<\/code>).<\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0448\u0435\u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e, \u0432 Linux \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 <a href=\"http:\/\/man7.org\/linux\/man-pages\/man2\/getrandom.2.html\"><code>getrandom(2)<\/code><\/a>.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0442\u0435\u0440\u043f\u0438\u0442 \u043d\u0435\u0443\u0434\u0430\u0447\u0443, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 PHP \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c <code>\/dev\/urandom<\/code>.<\/li>\n<li>\u041f\u0440\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442<\/h2>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u00ab\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c\u00bb \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445, \u043d\u0435 \u0432\u043d\u0438\u043a\u0430\u044f \u0432 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043e\u0446\u0435\u043d\u043a\u0435 \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u2014 \u0438\u0433\u0440\u0430 \u0432 \u043a\u043e\u0441\u0442\u0438. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u0438 \u043f\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0441\u0442\u0438 \u2014 \u043e\u0434\u0438\u043d \u043a \u0448\u0435\u0441\u0442\u0438, \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0435\u0441\u043b\u0438 \u044f \u0431\u0440\u043e\u0448\u0443 \u0442\u0440\u0438 \u043a\u043e\u0441\u0442\u0438 100 \u0440\u0430\u0437, \u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0432\u044b\u043f\u0430\u0434\u0435\u043d\u0438\u044f 1, 2 \u0438 3\u0445 \u0448\u0435\u0441\u0442\u0435\u0440\u043e\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u0435:  <\/p>\n<ul>\n<li>0 \u0448\u0435\u0441\u0442\u0435\u0440\u043e\u043a = 57.9 \u0440\u0430\u0437<\/li>\n<li>1 \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u0430 = 34.7 \u0440\u0430\u0437<\/li>\n<li>2 \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u0438 = 6.9 \u0440\u0430\u0437<\/li>\n<li>3 \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u0438 = 0.5 \u0440\u0430\u0437<\/li>\n<\/ul>\n<p>  \u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u0441\u043a\u0430 \u043a\u043e\u0441\u0442\u0435\u0439 1 000 000 \u0440\u0430\u0437:<\/p>\n<pre><code class=\"php\">$times = 1000000; $result = []; for ($i=0; $i &lt; $times; $i++) {     $dieRoll = array(6 =&gt; 0); \/\/initializes just the six counting to zero     $dieRoll[roll()] += 1; \/\/first die     $dieRoll[roll()] += 1; \/\/second die     $dieRoll[roll()] += 1; \/\/third die     $result[$dieRoll[6]] += 1; \/\/counts the sixes } function roll() {     return random_int(1,6); } var_dump($result); <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0433\u043e\u043d\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432 PHP7 c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>random_int<\/code> \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e <code>rand<\/code> \u0432\u044b\u0434\u0430\u0441\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:  <\/p>\n<table>\n<tbody>\n<tr>\n<th>\u0428\u0435\u0441\u0442\u0435\u0440\u043a\u0438<\/th>\n<th>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/th>\n<th>random_int<\/th>\n<th>rand<\/th>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>579000<\/td>\n<td>579430<\/td>\n<td>578179<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>347000<\/td>\n<td>346927<\/td>\n<td>347620<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>69000<\/td>\n<td>68985<\/td>\n<td>69586<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>5000<\/td>\n<td>4658<\/td>\n<td>4615<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <code>rand<\/code> \u0438 <code>random_int<\/code> \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0443: <code>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 PHP<\/code> \u2014 <code>\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/code> \/ <code>sqrt(\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442)<\/code>.<\/p>\n<p>  \u0413\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a (\u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u043a \u043d\u0443\u043b\u044e, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435):  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/942\/335\/eef\/942335eef1ae4f09935722986e17d66a.png\" alt=\"\u0433\u0440\u0430\u0444\u0438\u043a test random\" title=\"\u0433\u0440\u0430\u0444\u0438\u043a test random\"\/><\/div>\n<p>  \u0414\u0430\u0436\u0435 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u043b\u043e\u0445\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u0442\u0440\u0435\u043c\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u0430\u043c\u0438 \u0438 \u0432\u0441\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0442\u0435\u0441\u0442\u0430, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u044f\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e <code>random_int<\/code> \u043d\u0430\u0434 <code>rand<\/code>.<\/p>\n<h2>\u0410 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 PHP5?<\/h2>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, PHP5 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0441\u0435\u0432\u0434\u043e-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"http:\/\/php.net\/manual\/en\/function.openssl-random-pseudo-bytes.php\"><code>openssl_random_pseudo_bytes()<\/code><\/a>, <a href=\"http:\/\/php.net\/manual\/en\/function.mcrypt-create-iv.php\"><code>mcrypt_create_iv()<\/code><\/a> \u0438\u043b\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/\/dev\/random\"><code>\/dev\/random<\/code><\/a> \u0438\u043b\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/\/dev\/random\"><code>\/dev\/urandom<\/code><\/a> \u0441 <code>fread()<\/code>. \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u0430\u043a <a href=\"https:\/\/github.com\/ircmaxell\/RandomLib\">RandomLib<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/pecl.php.net\/package\/libsodium\">libsodium<\/a>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443 \u043d\u0430 PHP7, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/paragonie\/random_compat\"><code>random_compat<\/code><\/a> \u043e\u0442 Paragon Initiative Enterprises. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>random_bytes()<\/code> \u0438 <code>random_int()<\/code> \u0432 PHP 5.\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/getcomposer.org\/\">Composer<\/a>:<\/p>\n<pre><code class=\"bash\">composer require paragonie\/random_compat <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\">require 'vendor\/autoload.php'; $string = random_bytes(32); var_dump(bin2hex($string)); \/\/ string(64) &quot;8757a27ce421b3b9363b7825104f8bc8cf27c4c3036573e5f0d4a91ad2aaec6f&quot; $int = random_int(0,255); var_dump($int); \/\/ int(81) <\/code><\/pre>\n<p>  \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 PHP7, <code>random_compat<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b:  <\/p>\n<ol>\n<li><code>fread()<\/code> <code>\/dev\/urandom<\/code> \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e<\/li>\n<li><code>mcrypt_create_iv($bytes, MCRYPT_CREATE_IV)<\/code><\/li>\n<li><code>COM('CAPICOM.Utilities.1')-&gt;GetRandom()<\/code><\/li>\n<li><code>openssl_random_pseudo_bytes()<\/code><\/li>\n<\/ol>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/paragonie\/random_compat\/blob\/master\/ERRATA.md\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"php\">$passwordChar = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $passwordLength = 8; $max = strlen($passwordChar) - 1; $password = ''; for ($i = 0; $i &lt; $passwordLength; ++$i) {     $password .= $passwordChar[random_int(0, $max)]; } echo $password; \/\/possible output: 7rgG8GHu <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u0438\u0442\u043e\u0433<\/h2>\n<p>  \u0412\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u043e\u0439\u043a\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438 <code>random_compat<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 <code>random_int<\/code> \u0438 <code>random_bytes<\/code>.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438 \u043f\u043e \u0442\u0435\u043c\u0435<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Diehard_tests\">Die Hard Test<\/a><\/li>\n<li><a href=\"http:\/\/bit.ly\/1Mrptf5\">Chi-square test with dice example<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Kolmogorov-Smirnov_test\">Kolmogorov-Smirnov Test<\/a><\/li>\n<li><a href=\"http:\/\/random.mat.sbg.ac.at\/tests\/theory\/spectral\/\">Spectral Test<\/a><\/li>\n<li><a href=\"http:\/\/cristianopi.altervista.org\/RaBiGeTe_MT\">RaBiGeTe test suite<\/a><\/li>\n<li><a href=\"http:\/\/cristianopi.altervista.org\/RaBiGeTe_MT\">Random Number Generation In PHP (2011)<\/a><\/li>\n<li><a href=\"http:\/\/ubm.io\/1Ot46vL\">Testing RNG part 1<\/a> <a href=\"http:\/\/ubm.io\/1VNzh3N\">and 2<\/a><\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/272509\/\"> http:\/\/habrahabr.ru\/post\/272509\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" width=\"100%\" src=\"https:\/\/habrastorage.org\/files\/dd7\/176\/96c\/dd717696cc1a4dc69497bb7d06734f94.jpg\" alt=\"\u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 PHP\" title=\"\u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 PHP\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. PHP5 \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0440\u0438\u043f\u0442\u043e\u0441\u0442\u043e\u0439\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a PHP7 \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0443\u0442\u0435\u043c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8_%D1%81%D1%82%D0%BE%D0%B9%D0%BA%D0%B8%D0%B9_%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80_%D0%BF%D1%81%D0%B5%D0%B2%D0%B4%D0%BE%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB\">CSPRNG<\/a>-\u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 CSPRNG?<\/h2>\n<p>  \u0426\u0438\u0442\u0438\u0440\u0443\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8_%D1%81%D1%82%D0%BE%D0%B9%D0%BA%D0%B8%D0%B9_%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80_%D0%BF%D1%81%D0%B5%D0%B2%D0%B4%D0%BE%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB\">\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e<\/a>, \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u043e\u0439\u043a\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0430\u043d\u0433\u043b. Cryptographically secure pseudorandom number generator, CSPRNG) \u2014 \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438.<\/p>\n<p>  CSPRNG \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:  <\/p>\n<ul>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f public\/private \u043a\u043b\u044e\u0447\u0435\u0439)<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>CSPRNG \u0432 PHP7<\/h2>\n<p>  PHP7 \u0432\u0432\u043e\u0434\u0438\u0442 \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f CSPRNG: <a href=\"http:\/\/php.net\/manual\/en\/function.random-bytes.php\"><code>random_bytes<\/code><\/a> \u0438 <a href=\"http:\/\/php.net\/manual\/en\/function.random-int.php\"><code>random_int<\/code><\/a>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-269787","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269787"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269787\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}