{"id":276207,"date":"2016-03-15T23:19:02","date_gmt":"2016-03-15T20:19:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276207"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276207","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f"},"content":{"rendered":"<p>       \u041f\u0440\u0438\u0432\u0435\u0442 \u0425\u0430\u0431\u0440!<br \/>  \u0423 \u043c\u0435\u043d\u044f \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043d\u043e \u043d\u0435\u043e\u0445\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438\u0437\u043e\u0431\u0440\u0435\u043b \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e <b>\u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439<\/b> XOR.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0425\u041e\u0420-\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/h3>\n<p>  \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5#.D0.A2.D1.80.D0.B5.D0.B1.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D1.8F_.D0.BA_.D0.B3.D0.B0.D0.BC.D0.BC.D0.B5\">\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f<\/a>,   <\/p>\n<blockquote><p>\u0414\u043b\u0438\u043d\u0430 \u0433\u0430\u043c\u043c\u044b \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u043b\u0438\u043d\u044b \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430). \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0433\u0430\u043c\u043c\u044b, \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0448\u0438\u0444\u0440\u043e\u0442\u0435\u043a\u0441\u0442\u0430 \u0443\u0433\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b, \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0431\u0438\u0442\u044b \u0433\u0430\u043c\u043c\u044b.<\/p><\/blockquote>\n<p>\u0422\u043e\u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447 \u0434\u043b\u0438\u043d\u043e\u0439, \u043f\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043c\u0435\u0440\u0435, \u0440\u0430\u0432\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0442\u043e \u0448\u0438\u0444\u0440 XOR \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0441\u0442\u043e\u0439\u043a\u0438\u0439, \u0447\u0435\u043c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \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, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0448\u0438\u0444\u0440.<\/p>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u2014 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<br \/>  \u0418 \u0442\u0430\u043a, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>  <b>1. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 HEX, \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e 2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/b>  <\/p>\n<pre><code class=\"php\">$encoded = bin2hex($str); $encoded = str_split($encoded, 2); <\/code><\/pre>\n<p>  <a name=\"hashing\"><\/a><b>2. \u041f\u0430\u0440\u043e\u043b\u044c \u0445\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e 2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/b>  <\/p>\n<pre><code class=\"php\">$binkey = md5($key); for($i=0;$i&lt;(count($encoded)\/16)+1;$i++){ \t$binkey .= md5($key.$binkey); } $binkey = str_split($binkey, 2); <\/code><\/pre>\n<p>  <b>3. \u041a\u0441\u043e\u0440\u0438\u043c<\/b>  <\/p>\n<pre><code class=\"php\">for ($i=0;$i&lt;count($encoded);$i++){ \t$a = $encoded[$i]; \t$returnment .= bin2hex( \t\tpack('H*', $a) \t\t^ \t\tpack('H*', $binkey[$i]) \t); } <\/code><\/pre>\n<p>  <b>4. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0437\u0430\u0434 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0442\u043e\u043c \u0432 base64. \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u044b base64<\/b>  <\/p>\n<pre><code class=\"php\">$returnment = hex2bin($returnment); $returnment = base64_encode($returnment); $returnment = str_replace('+', '-', $returnment); $returnment = str_replace('\/', '_', $returnment); <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"php\">$encoded = bin2hex($str); $encoded = str_split($encoded, 2); $binkey = md5($key); for($i=0;$i&lt;(count($encoded)\/16)+1;$i++){ \t$binkey .= md5($key.$binkey); } $binkey = str_split($binkey, 2); $returnment = ''; for ($i=0;$i&lt;count($encoded);$i++){ \t$a = $encoded[$i]; \t$returnment .= bin2hex( \t\tpack('H*', $a) \t\t^ \t\tpack('H*', $binkey[$i]) \t); } $returnment = hex2bin($returnment); $returnment = base64_encode($returnment); $returnment = str_replace('+', '-', $returnment); $returnment = str_replace('\/', '_', $returnment); return $returnment; <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u043a \u0436\u0435.  <\/p>\n<pre><code class=\"php\">$str = str_replace('-', '+', $str); $str = str_replace('_', '\/', $str); $str = base64_decode($str); $str = bin2hex($str); $str = str_split($str, 2); $binkey = md5($key); for($i=0;$i&lt;(count($str)\/16)+1;$i++){ \t$binkey .= md5($key.$binkey); } $binkey = str_split($binkey, 2); $returnment = ''; for ($i=0;$i&lt;count($str);$i++){ \t$a = $str[$i]; \t$returnment .= ( \t\tpack('H*',  \t\t\tpack('H*',  \t\t\t\tbin2hex($a) \t\t\t) \t\t) \t\t^ \t\tpack('H*',  \t\t\tpack('H*',  \t\t\t\tbin2hex($binkey[$i]) \t\t\t) \t\t) \t); } return $returnment; <\/code><\/pre>\n<p>  \u041d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u044e\u0447\u0430. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0445\u0435\u0448\u0443\u0435\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 (<a href=\"#hashing\">\u0441\u043c. \u0432\u044b\u0448\u0435<\/a>), \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c. \u041d\u0443, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442, \u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0445\u044d\u0448 (\u043e\u043d \u2014 \u0445\u044d\u0448 \u043f\u0430\u0440\u043e\u043b\u044f), \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u0438\u043d\u0430 md5-\u0445\u044d\u0448\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f.<\/p>\n<p>  \u041d\u0443, \u0432\u043e\u0442 \u0438 \u0432\u0441\u0435.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:<br \/>  <b>9tIxJAkLcPczhKURkE8YxK2F-WhkmlLcjoE08A==<\/b><\/p>\n<p>  \u041a\u043e\u0434 \u043d\u0430 GitHub: <a href=\"https:\/\/github.com\/da411d\/Crypto228\">https:\/\/github.com\/da411d\/Crypto228<\/a><br \/>  \u0414\u0435\u043c\u043a\u0430: <a href=\"http:\/\/app.blastorq.pp.ua\/crypto228\/\">http:\/\/app.blastorq.pp.ua\/crypto228\/<\/a>               <\/p>\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=\"https:\/\/habrahabr.ru\/post\/279371\/\"> https:\/\/habrahabr.ru\/post\/279371\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041f\u0440\u0438\u0432\u0435\u0442 \u0425\u0430\u0431\u0440!<br \/>  \u0423 \u043c\u0435\u043d\u044f \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043d\u043e \u043d\u0435\u043e\u0445\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438\u0437\u043e\u0431\u0440\u0435\u043b \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e <b>\u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439<\/b> XOR.  <\/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-276207","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276207","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=276207"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276207\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}