{"id":175133,"date":"2013-04-02T15:56:05","date_gmt":"2013-04-02T11:56:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=175133"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=175133","title":{"rendered":"<span class=\"post_title\">\u0425\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0445\u0438\u0449\u044f\u044e\u0442. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u044d\u0442\u043e, \u0432\u0430\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0430\u0440\u043e\u043b\u0438, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0437\u0430 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0442\u0435\u043c, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0438 \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>  \u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u2014 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0442\u0435\u043c\u0430, \u0438 \u044f \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442. \u0412 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430\u0445 \u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u043b\u043e\u0432\u044b\u0445 \u0432\u0435\u0434\u043e\u043c\u0441\u0442\u0432\u0430\u0445.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0412\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<h4>\u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u00ab\u0425\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00bb<\/h4>\n<p>  <\/p>\n<blockquote><p>\u0425\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435(\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438\u043b\u0438 \u043c\u0430\u043b\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432), \u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043e\u0442\u0440\u0435\u0437\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043b\u0438 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p><\/blockquote>\n<p>  \u042d\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u201c\u041e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f\u201d \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e (\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e) \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 md5(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"php\">$data = &quot;Hello World&quot;;   $hash = md5($data);   echo $hash; \/\/ b10a8db164e0754105b7a99be72e3fe5  <\/code><\/pre>\n<p>  md5() \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c 32 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u041d\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 128-\u0431\u0438\u0442\u043d\u043e\u0433\u043e (16 \u0431\u0430\u0439\u0442\u043d\u043e\u0433\u043e) \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c md5() \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0412\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0445\u044d\u0448 \u043e\u0434\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u0423\u0436\u0435 \u043e\u0434\u0438\u043d \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u201c\u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e\u201d \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439<\/h4>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043f\u043e\u043b\u0435 \u043f\u0430\u0440\u043e\u043b\u044c.<\/li>\n<li>\u0412\u0435\u0431-\u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c.<\/li>\n<li>\u041d\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f.<\/li>\n<\/ul>\n<p>  \u0418 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0438\u043b\u0438 e-mail) \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/li>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0442\u043e\u0439 \u0436\u0435 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/li>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0447\u0438\u0442\u0430\u0435\u0442 \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c.<\/li>\n<li>\u041e\u0431\u0430 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/li>\n<\/ul>\n<p>  \u0420\u0430\u0437 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f, \u043c\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0437\u0436\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u043a\u0440\u0430\u043b\u0438, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0432\u0435\u0440\u043d\u043e? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0435\u0440\u0432\u0430\u044f. \u041a\u043e\u043b\u043b\u0438\u0437\u0438\u044f \u0445\u044d\u0448\u0435\u0439<\/h4>\n<p>  \u041a\u043e\u043b\u043b\u0438\u0437\u0438\u044f \u0445\u044d\u0448\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0436\u0435 \u0445\u044d\u0448. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e?<\/h5>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0432\u0438\u0434\u0435\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 crc32() \u0434\u043b\u044f \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 2<sup>32<\/sup> (\u0442.\u0435. 4,294,967,296) \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c:  <\/p>\n<pre><code class=\"php\">echo crc32('supersecretpassword');   \/\/ \u0432\u0435\u0440\u043d\u0451\u0442: 323322056  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u044b\u0433\u0440\u0430\u0435\u043c \u0440\u043e\u043b\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0440\u0430\u043b \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041c\u044b \u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c 323322056 \u0432 &quot; supersecretpassword&quot;, \u043e\u0434\u043d\u0430\u043a\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u043e \u0436\u0435 \u0445\u044d\u0448-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0438 \u043d\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:  <\/p>\n<pre><code class=\"php\">set_time_limit(0); $i = 0; while (true) {  \tif (crc32(base64_encode($i)) == 323322056) { \t\techo base64_encode($i); \t\texit; \t}  \t$i++; } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e \u0443\u0439\u0434\u0451\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0445\u043e\u0442\u044f, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u041c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u00absupersecretpassword\u00bb \u0438 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u043e\u0439\u0442\u0438 \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043c\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0443\u043b\u0430: \u00abMTIxMjY5MTAwNg==\u2018. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"php\">echo crc32('supersecretpassword'); \/\/ \u0432\u0435\u0440\u043d\u0451\u0442: 323322056  echo crc32('MTIxMjY5MTAwNg=='); \/\/ \u0432\u0435\u0440\u043d\u0451\u0442: 323322056 <\/code><\/pre>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c?<\/h5>\n<p>  \u0412 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f, \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0447\u0442\u0438 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0445\u044d\u0448 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 md5(), \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 128-\u0431\u0438\u0442\u043d\u044b\u0439 \u0445\u0435\u0448. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a 340,282,366,920,938,463,463,374,607,431,768,211,456 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0445\u044d\u0448\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0439\u0442\u0438 \u0445\u044d\u0448 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u044e\u0434\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043f\u0443\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e.<\/p>\n<h5>Sha1<\/h5>\n<p>  Sha1() \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439, \u0432\u0435\u0434\u044c \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 160-\u0431\u0438\u0442\u043d\u043e\u0435 \u0445\u044d\u0448-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u0442\u043e\u0440\u0430\u044f. \u0420\u0430\u0434\u0443\u0436\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h4>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u043b\u0438 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044e, \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u044c\u0441\u044f \u0432 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.  <\/p>\n<blockquote><p>\u0420\u0430\u0434\u0443\u0436\u043d\u0430\u044f \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0445\u044d\u0448-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0438\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439.<\/p><\/blockquote>\n<p>  \u042d\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u044d\u0448-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432. \u0418 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435, \u0412\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0446\u0438\u0444\u0440\u044b \u0434\u043e\/\u043f\u043e\u0441\u043b\u0435\/\u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0438 \u0442\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p>  \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0448\u0451\u0432\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432 \u043d\u0430\u0448\u0438 \u0434\u043d\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>\u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0435<\/b> \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e?<\/h5>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443\u043a\u0440\u0430\u0434\u0435\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 10 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u043c\u0438 \u0445\u044d\u0448 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445. \u041d\u0435 \u0432\u0441\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b, \u043d\u043e, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435\u2026 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0443\u0434\u0430\u0441\u0442\u0441\u044f!<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c?<\/h5>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u201c\u0441\u043e\u043b\u044c\u201d:  <\/p>\n<pre><code class=\"php\">$password = &quot;easypassword&quot;;  \/\/ \u0445\u044d\u0448 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d \u0432 \u0440\u0430\u0434\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \/\/ \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430 echo sha1($password); \/\/ 6c94d3b42518febd4ad747801d50a8972022f956  \/\/ \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u043b\u0438 $salt = &quot;f#@V)Hu^%Hgfds&quot;;  \/\/ \u0442\u0430\u043a\u043e\u0439 \u0445\u044d\u0448 \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0434\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 echo sha1($salt . $password); \/\/ cd56a16759623378628c0d9336af69b74d9d71a5 <\/code><\/pre>\n<p>  \u0412\u0441\u0451, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u044d\u0442\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u201c\u0441\u043e\u043b\u044c\u201d \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0445\u044d\u0448 \u044f\u0432\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d \u0432 \u201e\u043e\u0431\u044b\u0447\u043d\u043e\u0439\u201c \u0440\u0430\u0434\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438!<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0440\u0435\u0442\u044c\u044f. \u0418 \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h4>\n<p>  \u0420\u0430\u0434\u0443\u0436\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043a\u0440\u0430\u0436\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e?<\/h5>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0441\u043e\u043b\u044c, \u043e\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b\u0442\u044c \u0443\u043a\u0440\u0430\u0434\u0435\u043d\u043e\u0439 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0440\u0430\u0434\u0443\u0436\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u201e\u0441 \u043d\u0443\u043b\u044f\u201c, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043b\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0443\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u201ceasypassword\u201d \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0432 \u043d\u043e\u0432\u043e\u0439 \u0440\u0430\u0434\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0431\u0443\u0434\u0435\u0442 \u0443\u0436\u0435 \u201cf#@V)\u0425\u0443^%Hgfdseasypassword\u201d, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u0441\u043d\u043e\u0432\u0430 \u0441\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c?<\/h5>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201c\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043e\u043b\u044c\u201d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0445 \u0441\u043e\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 id \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<pre><code class=\"php\">$hash = sha1($user_id . $password);  <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 id \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043a\u0430\u043a \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043e\u043b\u044c. \u041d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u043e\u043b\u044c.  <\/p>\n<pre><code class=\"php\">\/\/ \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c 22-\u0443\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 function unique_salt() {  \treturn substr(sha1(mt_rand()),0,22); }  $unique_salt = unique_salt();  $hash = sha1($unique_salt . $password);  \/\/ \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c $unique_salt \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \/\/ ... <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043e\u043b\u044c. \u0417\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u0442\u044c 10 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u0430\u044f. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/h4>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0445\u044d\u0448\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u0443\u043c\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e?<\/h5>\n<p>  \u041a\u0430\u043a \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u041f\u041a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0449\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (\u0434\u0430-\u0434\u0430, \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442) \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434 \u0445\u044d\u0448\u0435\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201e\u0433\u0440\u0443\u0431\u0443\u044e \u0441\u0438\u043b\u0443\u201c(\u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<p>  \u0412\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0443\u043c 8-\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441\u0430, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a:  <\/p>\n<ul>\n<li>\u041f\u0430\u0440\u043e\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435, \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b \u0438 \u0447\u0438\u0441\u043b\u0430, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 62 (26+26+10) \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u0430.<\/li>\n<li>8-\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0438\u043c\u0435\u0435\u0442 62<sup>8<\/sup> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 218 \u0442\u0440\u043b\u043d.<\/li>\n<li>\u0421\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 1 \u043c\u043b\u0440\u0434. \u0445\u044d\u0448\u0435\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043b\u043e 60 \u0447\u0430\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u043e\u043b\u044f.<\/li>\n<\/ul>\n<p>  6-\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u043c, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 1 \u043c\u0438\u043d\u0443\u0442\u0443.<\/p>\n<p>  \u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c 9-\u0438 \u0438\u043b\u0438 10-\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u043e \u044d\u0442\u0438\u043c \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c?<\/h5>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.  <\/p>\n<blockquote><p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043c\u043b\u043d \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u0432\u043c\u0435\u0441\u0442\u043e 1 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u042d\u0442\u043e \u0437\u0430\u0439\u043c\u0451\u0442 \u0432 1000 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0438 60 \u0447\u0430\u0441\u043e\u0432 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u044f\u0442\u0441\u044f \u0432 \u043f\u043e\u0447\u0442\u0438 7 \u043b\u0435\u0442!!!<\/p><\/blockquote>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f 1000 \u0440\u0430\u0437:  <\/p>\n<pre><code class=\"php\">function myhash($password, $unique_salt) {  \t$salt = &quot;f#@V)Hu^%Hgfds&quot;; \t$hash = sha1($unique_salt . $password);  \t\/\/ make it take 1000 times longer \tfor ($i = 0; $i &lt; 1000; $i++) { \t\t$hash = sha1($hash); \t}  \treturn $hash; } <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u201ecost parameter\u201c, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a BLOWFISH. \u0412 PHP, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 crypt().  <\/p>\n<pre><code class=\"php\">function myhash($password, $unique_salt) {  \t\/\/ \u0441\u043e\u043b\u044c \u0434\u043b\u044f blowfish \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043b\u0438\u043d\u043e\u0439 \u0432 22 \u0441\u0438\u043c\u0432\u043e\u043b\u0430  \treturn crypt($password, '$2a$10$'.$unique_salt);  } <\/code><\/pre>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 crypt() \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u043c \u0434\u043e\u043b\u043b\u0430\u0440\u0430 ($).<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435-\u044d\u0442\u043e &#8216;$2a\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c BLOWFISH.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, &#8216;$10-\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u2014 \u00abcost parameter\u00bb. \u042d\u0442\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e 2, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c (10 =&gt; 2<sup>10<\/sup> = 1024 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.) \u042d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 04, 31.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"php\">function myhash($password, $unique_salt) { \treturn crypt($password, '$2a$10$'.$unique_salt);  } function unique_salt() { \treturn substr(sha1(mt_rand()),0,22); } $password = &quot;verysecret&quot;;  echo myhash($password, unique_salt()); \/\/ \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: $2a$10$dfda807d832b094184faeu1elwhtR2Xhtuvs3R9J1nfRGBCudCCzC <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0445\u044d\u0448 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c ($2a), cost parameter ($10), \u0438 22 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u043e\u043b\u044c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0442\u0435\u0441\u0442:  <\/p>\n<pre><code class=\"php\">\/\/ \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u044d\u0442\u043e \u043c\u044b \u0432\u044b\u0442\u0430\u0449\u0438\u043b\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b $hash = '$2a$10$dfda807d832b094184faeu1elwhtR2Xhtuvs3R9J1nfRGBCudCCzC';  \/\/ \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c, \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 $password = &quot;verysecret&quot;;  if (check_password($hash, $password)) { \techo &quot;Access Granted!&quot;; } else { \techo &quot;Access Denied!&quot;; } function check_password($hash, $password) {  \t\/\/ \u043f\u0435\u0440\u0432\u044b\u0435 29 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u0441\u043e\u043b\u044c,  cost parameter \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \t\/\/ \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0437\u043e\u0432\u0451\u043c\u0438\u0445 $full_salt \t$full_salt = substr($hash, 0, 29);  \t\/\/ \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044e \t$new_hash = crypt($password, $full_salt);  \t\/\/ \u0432\u0435\u0440\u043d\u0451\u0442 true \u0438\u043b\u0438 false \treturn ($hash == $new_hash); } <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c: \u00abAccess Granted!\u00bb<\/p>\n<h4>\u0421\u043b\u043e\u0436\u0438\u043c \u0432\u0441\u0435 \u0412\u043c\u0435\u0441\u0442\u0435<\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0443\u0442\u0438\u043b\u0438\u0442, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e:  <\/p>\n<pre><code class=\"php\">class PassHash {  \t\/\/ blowfish \tprivate static $algo = '$2a';  \t\/\/ cost parameter \tprivate static $cost = '$10';  \tpublic static function unique_salt() { \t\treturn substr(sha1(mt_rand()),0,22); \t}  \t\/\/ \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0445\u044d\u0448\u0430 \tpublic static function hash($password) {  \t\treturn crypt($password, \t\t\t\t\tself::$algo . \t\t\t\t\tself::$cost . \t\t\t\t\t'$' . self::unique_salt());  \t} \tpublic static function check_password($hash, $password) {  \t\t$full_salt = substr($hash, 0, 29);  \t\t$new_hash = crypt($password, $full_salt);  \t\treturn ($hash == $new_hash);  \t}  } <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:  <\/p>\n<pre><code class=\"php\">\/\/ \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 require (&quot;PassHash.php&quot;);  \/\/ read all form input from $_POST \/\/ ...  \/\/ do your regular form validation stuff \/\/ ...  \/\/ hash the password $pass_hash = PassHash::hash($_POST['password']);  \/\/ store all user info in the DB, excluding $_POST['password'] \/\/ store $pass_hash instead \/\/ ... <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:  <\/p>\n<pre><code class=\"php\">\/\/ \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 require (&quot;PassHash.php&quot;);  \/\/ \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u0438\u0437 $_POST \/\/ ...  \/\/ \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b\u0435 \u043d\u0430 $_POST['username'] \/\/ ...  \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c if (PassHash::check_password($user['pass_hash'], $_POST['password']) { \t\/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \t\/\/ ... } else { \t\/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d \t\/\/ ... } <\/code><\/pre>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c Blowfish \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0445\u043e\u0442\u044f \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"php\">if (CRYPT_BLOWFISH == 1) { \techo &quot;Yes&quot;; } else { \techo &quot;No&quot;; }  <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 PHP 5.3, \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f. PHP \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 BLOWFISH, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0438, \u043f\u0443\u0442\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044f, \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0446\u0438\u0444\u0440 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u0412\u043e\u043f\u0440\u043e\u0441 \u043a \u0412\u0430\u043c, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c: \u043a\u0430\u043a \u0412\u044b \u0445\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0435 \u0412\u0430\u0448\u0438 \u043f\u0430\u0440\u043e\u043b\u0438? \u041c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438 \u0412\u044b \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b?<\/p>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/h4>\n<p>  <a href=\"http:\/\/net.tutsplus.com\/tutorials\/php\/understanding-hash-functions-and-keeping-passwords-safe\/\">http:\/\/net.tutsplus.com\/<\/a> \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/175133\/\"> http:\/\/habrahabr.ru\/post\/175133\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0445\u0438\u0449\u044f\u044e\u0442. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u044d\u0442\u043e, \u0432\u0430\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0430\u0440\u043e\u043b\u0438, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0437\u0430 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0442\u0435\u043c, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0438 \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445.  <\/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-175133","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175133","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=175133"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175133\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}