{"id":2236,"date":"2018-05-04T09:57:43","date_gmt":"2018-05-04T00:57:43","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=2236"},"modified":"2023-05-27T20:38:39","modified_gmt":"2023-05-27T11:38:39","slug":"%e3%80%90web%e3%82%bb%e3%82%ad%e3%83%a5%e3%83%aa%e3%83%86%e3%82%a3%e3%80%91%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%81%ae%e3%83%8f%e3%83%83%e3%82%b7%e3%83%a5%e5%8c%96%e3%81%ab%e3%81%a4","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=2236","title":{"rendered":"\u3010Web\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3011\u30cf\u30c3\u30b7\u30e5\u95a2\u6570(digest)\u3001\u5b9f\u88c5\u65b9\u6cd5\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u904b\u7528\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u901a\u5e38\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3042\u308c\u3070\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u305f\u3060\u3001\u305d\u306e\u307e\u307e\uff24\uff22\u306b\u4fdd\u5b58\u3059\u308b\u306e\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u671b\u307e\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u5bfe\u7b56\u3068\u3057\u3066\u3001\u73fe\u5728\u306f\uff24\uff22\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u5b58\u3059\u308b\u969b\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u3092\u4f7f\u3063\u3066<\/strong><strong>\u30cf\u30c3\u30b7\u30e5(digest)\u5316\u3055\u305b\u308b<\/strong><\/span>\u306e\u304c\u666e\u901a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u305d\u3082\u305d\u3082\u30cf\u30c3\u30b7\u30e5\u5316(digest)\u3068\u306f\uff1f<\/h2>\n<p>\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5225\u306e\u3082\u306e\uff08\u56fa\u5b9a\u9577\u306e\u7591\u4f3c\u4e71\u6570\uff09\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u5225\u306e\u3082\u306e\u306b\u306a\u308b\u306e\u3067\u3001\u5143\u306b\u623b\u305b\u307e\u305b\u3093\u304c\u3001\u307e\u305f\u95a2\u6570\u3092\u4f7f\u3048\u3070\u5143\u306b\u623b\u305b\u307e\u3059\u3002\u300c\u5143\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u53d6\u308a\u51fa\u305b\u306a\u3044\u3088\u3046\u300d\u306b\u3057\u3064\u3064\u3001\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6b63\u3057\u3044\u304b\u5224\u5b9a\u3067\u304d\u308b\u300d\u3053\u3068\u3092\u4e21\u7acb\u3057\u305f\u306e\u304c<span style=\"color: #ff0000;\"><strong>\u300c\u30cf\u30c3\u30b7\u30e5\u5316\u300d<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002\u95a2\u6570\u306b\u95a2\u3057\u3066\u306f\u3001\u901a\u5e38\u306f\u5404\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u6a5f\u80fd\u3068\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30cf\u30c3\u30b7\u30e5\u306e\u7279\u6027<\/h3>\n<ul>\n<li>\u5165\u529b\u30c7\u30fc\u30bf\u304c\u540c\u3058\u3067\u3042\u308c\u3070\u3001\u5e38\u306b\u540c\u3058\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u304c\u751f\u6210\u3055\u308c\u308b\u3002<\/li>\n<li>\u5165\u529b\u30c7\u30fc\u30bf\u304c\u5c11\u3057\u3067\u3082\u7570\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u751f\u6210\u3055\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u306f\u5927\u304d\u304f\u7570\u306a\u3063\u305f\u3082\u306e\u306b\u306a\u308b\u3002<\/li>\n<li>\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u304b\u3089\u5143\u306e\u5165\u529b\u30c7\u30fc\u30bf\u3092\u518d\u73fe\u3059\u308b\u3053\u3068\u304c\u56f0\u96e3\uff08\u5f8c\u8ff0\u3059\u308b\u3088\u3046\u306b\u4eca\u306f\u7d76\u5bfe\u5b89\u5168\u3067\u306f\u306a\u3044\u3067\u3059\uff09<\/li>\n<\/ul>\n<h2>\u30cf\u30c3\u30b7\u30e5\u5316\u3057\u3066\u3082\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7684\u306b\u7d76\u5bfe\u5b89\u5168\u3067\u306f\u306a\u3044\uff1f<\/h2>\n<p>\u30cf\u30c3\u30b7\u30e5\u5316\u3059\u308c\u3070\u3001\u6d41\u51fa\u3057\u3066\u3082\u5927\u4e08\u592b\u304b\u3068\u3044\u3046\u3068\u305d\u3046\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5909\u63db\u5f8c\u306e\u5024\u304b\u3089\u3001\u5143\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u63a2\u7d22\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u51fa\u56de\u3063\u3066\u3044\u308b\u305f\u3081\u3067\u3059\u3002\u305f\u3060\u3001\u653b\u6483\u8005\u306b\u3088\u308b\u653b\u6483\u3082\u6642\u9593\u304c\u304b\u304b\u308b\u306e\u3067\u3001\u305d\u306e\u9593\u306e\u6642\u9593\u7a3c\u304e\u3068\u306f\u306a\u308a\u3048\u307e\u3059\u3002<\/p>\n<h3>\u30cf\u30c3\u30b7\u30e5\u5316\u3059\u308b\u4e0a\u3067\u306e\u6642\u9593\u3092\u7a3c\u3050\u4e0a\u3067\u306e\u5bfe\u7b56<\/h3>\n<p>\u307e\u305f\u3001\u5909\u63db\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u3001\u975e\u5e38\u306b\u9ad8\u901f\u306a\u306e\u3067\u3001\u305d\u308c\u307b\u3069\u6642\u9593\u306f\u7a3c\u3052\u307e\u305b\u3093\u3002\u306a\u306e\u3067\u3001\u901a\u5e38\u306f\u8ffd\u52a0\u3067\u4e0b\u8a18\u306e\u5bfe\u7b56\u3082\u884c\u3044\u307e\u3059\u3002<\/p>\n<h4>\u30bd\u30eb\u30c8<\/h4>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u8ffd\u52a0\u306e\u6587\u5b57\u5217\u3092\u52a0\u3048\u3066\u9577\u304f\u3059\u308b\u3002<\/p>\n<h4>\u30b9\u30c8\u30ec\u30c3\u30c1<\/h4>\n<p>\u5909\u63db\u51e6\u7406\u3092\u8907\u6570\u56de\u884c\u3063\u3066\u51e6\u7406\u6642\u9593\u3092\u9577\u304f\u3059\u308b\u3002<\/p>\n<h2>\u826f\u3044\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u306e\u6761\u4ef6<\/h2>\n<p>\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u306b\u3082\u8272\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u826f\u3044\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u306e\u6761\u4ef6\u3068\u3057\u3066\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u5165\u529b\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u51fa\u529b\u30c7\u30fc\u30bf\u304c\u4e88\u6e2c\u3067\u304d\u306a\u3044\u3053\u3068\u300d<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u306e\u7a2e\u985e<\/h2>\n<table>\n<tbody>\n<tr>\n<th width=\"100\">\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u540d<\/th>\n<th>\u6697\u53f7\u5f37\u5ea6<\/th>\n<th>\u30cf\u30c3\u30b7\u30e5\u9577(bit)<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>MD5<\/td>\n<td>\u4f4e<\/td>\n<td>128<\/td>\n<td>\u5909\u63db\u5f8c\u306e\u5024\u304b\u3089\u3001\u5143\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u63a2\u7d22\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u767a\u898b\u3055\u308c\u3066\u3044\u308b\u306e\u3067<span style=\"color: #ff0000;\"><strong>\u5371\u967a<\/strong><\/span>\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>SHA-1<\/td>\n<td>\u4e2d<\/td>\n<td>160<\/td>\n<td>\u5909\u63db\u5f8c\u306e\u5024\u304b\u3089\u3001\u5143\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u63a2\u7d22\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u767a\u898b\u3055\u308c\u3066\u3044\u308b\u306e\u3067<span style=\"color: #ff0000;\"><strong>\u5371\u967a<\/strong><\/span>\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>SHA-2<\/td>\n<td>\u9ad8<\/td>\n<td>224\u3001256\u3001384\u3001512<\/td>\n<td>\u307e\u3060\u3001\u89e3\u6790\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4ed6\u306e\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u306b\u6bd4\u3079\u305f\u3089<span style=\"color: #ff0000;\"><strong>\u5b89\u5168<\/strong><\/span>\u3067\u3059\u3002\u65b0\u3057\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u969b\u306f\u3001\u3053\u308c\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30cf\u30c3\u30b7\u30e5\u9577\u306b\u3088\u308aSHA-224\u3001SHA-256\u306a\u3069\u3068\u3082\u547c\u3073\u307e\u3059\u3002SHA-224\u306f\u6697\u53f7\u5f37\u5ea6\u304c\u4f4e\u3044\u305f\u3081\u975e\u63a8\u5968\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Java\u306b\u304a\u3051\u308b\u30cf\u30c3\u30b7\u30e5\u5316\u95a2\u6570<\/h2>\n<p>\u901a\u5e38\u306f\u3001\u81ea\u5206\u3067\u8907\u96d1\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8003\u3048\u3066\u66f8\u304f\u306e\u306f\u5927\u5909\u3067\u3059\u3002\u306a\u306e\u3067\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u4e0a\u554f\u984c\u306a\u3044\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Java\u306b\u304a\u3044\u3066\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300cjava.security.MessageDigest\u300d<\/strong><\/span>\u30af\u30e9\u30b9\u3068\u3044\u3046\u306e\u304c\u3001\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u3068\u3057\u3066\u6709\u540d\u3067\u3059\u3002<\/p>\n<h2>Rails\u306b\u304a\u3051\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u306edigest\u5316<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>has_secure_password<\/strong><\/span>\u3068\u3044\u3046Rails\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u7c21\u5358\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092digest\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5fc5\u8981\u306agem<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u300cbcrypt\u300d<\/strong><\/span>\u3068\u3044\u3046\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u3092\u63d0\u4f9b\u3059\u308bgem\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>authenticate\u30e1\u30bd\u30c3\u30c9<\/h4>\n<p>bcrypt\u306eauthenticate\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u30e2\u30c7\u30eb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u4fdd\u7ba1\u3055\u308c\u3066\u3044\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u78ba\u8a8d\u7528\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u666e\u901a<\/h2>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u9593\u9055\u3063\u3066\u3044\u305f\u3089\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u30c8\u30e9\u30d6\u30eb\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u3001<span style=\"color: #ff0000;\"><strong>\u901a\u5e38\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u306f\u5225\u306b\u78ba\u8a8d\u7528\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3055\u305b\u308b\u65b9\u5f0f\u3068\u53d6\u3063\u3066\u3044\u308b\u30b7\u30b9\u30c6\u30e0\u304c\u307b\u3068\u3093\u3069<\/strong><\/span>\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u901a\u5e38\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3042\u308c\u3070\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u305f\u3060\u3001\u305d\u306e\u307e\u307e\uff24\uff22\u306b\u4fdd\u5b58\u3059\u308b\u306e\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u671b\u307e\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u5bfe\u7b56\u3068\u3057\u3066\u3001\u73fe\u5728\u306f\uff24\uff22\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u5b58\u3059\u308b\u969b\u306f\u3001\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30cf [&hellip;]","protected":false},"author":1,"featured_media":507,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,36,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2236"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2236"}],"version-history":[{"count":11,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2236\/revisions"}],"predecessor-version":[{"id":20239,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2236\/revisions\/20239"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/507"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}