{"id":1909,"date":"2023-06-09T10:23:51","date_gmt":"2023-06-09T01:23:51","guid":{"rendered":"https:\/\/euc-access-excel-db.com\/tips\/?p=1909"},"modified":"2023-12-29T14:54:05","modified_gmt":"2023-12-29T05:54:05","slug":"denntyouhou-timestamp-hash-get01","status":"publish","type":"post","link":"https:\/\/euc-access-excel-db.com\/tips\/ct07_se\/ct075012_xls2k_vba_tips\/denntyouhou-timestamp-hash-get01","title":{"rendered":"\u2605ExcelVBA \uff5e  \u3010\u96fb\u5b50\u5e33\u7c3f\u4fdd\u5b58\u6cd5\u30fb\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u3089\u307f\u3011\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u30b2\u30c3\u30c8\u3059\u308b\u95a2\u6570"},"content":{"rendered":"<p>\u2605ExcelVBA \uff5e \u3010\u96fb\u5b50\u5e33\u7c3f\u4fdd\u5b58\u6cd5\u30fb\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u3089\u307f\u3011\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u30b2\u30c3\u30c8\u3059\u308b\u95a2\u6570<\/p>\n<p><span style=\"color: #ff0000;\">\u203b\u307e\u3060\u66f8\u304d\u304b\u3051\u3067\u3059\u3002\u3059\u307f\u307e\u305b\u3093\u3002<\/span><br \/>\n<span style=\"color: #ff0000;\">\u203b\u9593\u9055\u3063\u3066\u305f\u3089\u3059\u307f\u307e\u305b\u3093\u3002<\/span><br \/>\n<span style=\"color: #ff0000;\">\u203b\u30e1\u30e2\u66f8\u304d\u306a\u306e\u3067\u3001\u81ea\u5206\u3067\u3082\u610f\u5473\u4e0d\u660e\u306a\u7b87\u6240\u3082\u591a\u3044\u3067\u3059\u3002\u3054\u3081\u3093\u306a\u3055\u3044\u3002<\/span><\/p>\n<p>\u53c2\u8003<br \/>\n\u7d19\u3067\u3082\u3089\u3063\u305f\u8acb\u6c42\u66f8\u306fPDF\u5316\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u304b\uff1f\u2192\u4e0d\u8981\u3002<br \/>\nPDF\u3084Excel\u306a\u3069\u3001\u96fb\u5b50\u30c7\u30fc\u30bf\u3067\u3082\u3089\u3063\u305f\u8acb\u6c42\u66f8\u306f\u7d19\u306b\u3057\u3066\u3044\u3044\u304b\uff1f\u2192\u7d19\u3060\u3051\u3058\u3083\u30c0\u30e1\u3002\u30c7\u30b8\u30bf\u30eb\u30c7\u30fc\u30bf\u306e\u307b\u3046\u3092\u4fdd\u7ba1\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002<br \/>\n\u7d50\u5c40\u3001\u300c\u5168\u90e8\u7d19\u3067\u3061\u3087\u3046\u3060\u3044\u300d\u304c\u300c\u4f55\u3082\u3057\u306a\u304f\u3066\u3044\u3044\u300d\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3057\u3001\u305b\u3063\u304b\u304f\u3082\u3089\u3063\u305f\u7d19\u3092\u300cPDF\u5316\u3057\u3066\u3057\u307e\u3046\u300d\u3068\u3001<br \/>\n\u4fdd\u5b58\u8981\u4ef6\u306e\u5bfe\u8c61\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u7d19\u3067\u3082\u3089\u3063\u305f\u3082\u306e\u306f\u5fc5\u305a\u7d19\u306e\u307f\u3067\u4fdd\u7ba1\u3059\u308b\u3002<\/p>\n<p>\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d<\/p>\n<p>\u4ee5\u4e0b\u3001\u672c\u6587\u3067\u3059\u3002<\/p>\n<p>\u96fb\u5b50\u5e33\u7c3f\u4fdd\u5b58\u6cd5\u306e\u300c\u96fb\u5b50\u30c7\u30fc\u30bf\u3067\u4ea4\u4ed8\u3084\u53d7\u53d6\u3092\u3057\u305f\u53d6\u5f15\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u306e\u7fa9\u52d9\u5316\u300d\u306b\u3064\u3044\u3066\u3001\u7336\u4e88\u671f\u9593\u304c\u3001\u672c\u5e74\u30012023\u5e7412\u670831\u65e5\u306b\u7d42\u308f\u308a\u307e\u3059\u3002<\/p>\n<p>\u5e74\u660e\u3051\u30fb2024\u5e741\u67081\u65e5\u304b\u3089\u306f\u3001<br \/>\n\u300c\u96fb\u5b50\u30c7\u30fc\u30bf\u3067\u4ea4\u4ed8\u3084\u53d7\u53d6\u3092\u3057\u305f\u53d6\u5f15\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u300d\u304c\u300c\u5b8c\u5168\u7fa9\u52d9\u5316\u300d\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u300c\u7d19\u306b\u5370\u5237\u3057\u3066\u4fdd\u5b58Only\u300d\u304c\u6cd5\u7684\u306b\u300c\u30c0\u30e1\u30fb\u9055\u6cd5\u300d\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\uff08\u203b\u96fb\u5b50\u30c7\u30fc\u30bf\u306e\u307e\u307e\u306e\u4fdd\u5b58\u304c\u3061\u3083\u3093\u3068\u3057\u3066\u3042\u308c\u3070\u3001\u8ffd\u52a0\u3067\u7d19\u306b\u5370\u5237\u3059\u308b\u3053\u3068\u306f\u9055\u6cd5\u3067\u306f\u306a\u3044\u3002\u4e07\u304c\u4e00\u306e\u305f\u3081\u306b\u91cd\u8981\u66f8\u985e\u3060\u3051\u96fb\u5b50\u3068\u7d19\u306e\u4e21\u65b9\u3067\u4fdd\u7ba1\u3059\u308b\u3053\u3068\u306f\u9055\u6cd5\u3067\u306f\u306a\u3044\u3002\u7ba1\u7406\u304c\u5927\u5909\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3051\u3069\u3002\uff09<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u305d\u306e\u5bfe\u8c61\u306f\u300c\u96fb\u5b50\u30c7\u30fc\u30bf\u3067\u3082\u3089\u3063\u305f\u3082\u306e\u300d\u300c\u3060\u3051\u300d\u3067\u3059\u3002<br \/>\n\u7d19\u3067\u3082\u3089\u3063\u305f\u8acb\u6c42\u66f8\u306f\u7d19\u306e\u307e\u307e\u3067OK\u3067\u3059\u3002PDF\u5316\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3057\u3001PDF\u5316\u3059\u308b\u3068\u9006\u306b\u300c\u6cd5\u5f8b\u4e0a\u306e\u4fdd\u5b58\u30b7\u30b9\u30c6\u30e0\u300d\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u3080\u3057\u308dPDF\u5316\u306a\u3069\u3092\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u3067\u3001\u7d50\u5c40\u3069\u306e\u3088\u3046\u306a\u65b9\u6cd5\u304c\u7fa9\u52d9\u4ed8\u3051\u3089\u308c\u308b\u306e\u304b\u3068\u3044\u3046\u3068\u3001\u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u3001<br \/>\n\u300c\u793e\u5185\u898f\u7d04\u3055\u3048\u4f5c\u3063\u3066\u304a\u3051\u3070\u3044\u3044\u300d<br \/>\n\u3067\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u306f\u3001\u300c\u3082\u3089\u3063\u305f\u30c7\u30fc\u30bf\uff08PDF\u7b49\uff09\u3092\u7d76\u5bfe\u306b\u7de8\u96c6\u30fb\u6539\u3056\u3093\u3057\u306a\u3044\u300d\u3068\u3044\u3046\u539f\u5247\u306b\u3057\u3066\u3001\u305d\u3046\u3044\u3063\u305f\u3001\u300c\u53d6\u308a\u6271\u3044\u306e\u30eb\u30fc\u30eb\uff08\uff1d\u793e\u5185\u898f\u7d04\u66f8\uff09\u300d\u3092\u66f8\u3044\u305f\u3082\u306e\u3092\u7528\u610f\u3057\u3066\u3001\u300c\u65e5\u4ed8\u3001\u53d6\u5f15\u5148\u3001\u91d1\u984d\u300d\u3067\u306e\u691c\u7d22\u304c\u3059\u3050\u306b\u3067\u304d\u308b\u72b6\u614b\u306b\u304a\u3051\u3070\u3001\u5df7\u3067\u3088\u304f\u8a00\u308f\u308c\u3066\u3044\u308b\u300c\u6709\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u52a0\u300d\u306a\u3069\u306f\u4e0d\u8981\u306e\u3088\u3046\u3067\u3059\u3002<br \/>\n\uff08\u305f\u3060\u3057\u3001\u305d\u308c\u306f\u8acb\u6c42\u66f8\u3084\u898b\u7a4d\u66f8\u306a\u3069\u306e\u66f8\u985e\u306e\u307f\u3002\u300c\u96fb\u5b50\u5951\u7d04\u66f8\u300d\u306a\u3069\u306e\u5834\u5408\u306f\u5225\u3002\u300c\u96fb\u5b50\u5951\u7d04\u66f8\u300d\u306a\u3069\u306e\u5834\u5408\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u304c\u5fc5\u9808\u3002\uff09<\/p>\n<p><a href=\"https:\/\/www.nta.go.jp\/law\/joho-zeikaishaku\/sonota\/jirei\/07denshi\/02.htm#a009\" target=\"_blank\" rel=\"noopener\">\u203b\u53c2\u8003\uff1a\u56fd\u7a0e\u5e81HP \uff5e \u554f9\u3000\u96fb\u5b50\u53d6\u5f15\u306e\u53d6\u5f15\u60c5\u5831\u306b\u4fc2\u308b\u96fb\u78c1\u7684\u8a18\u9332\u306e\u4fdd\u5b58\u7b49\u3092\u884c\u3046\u5834\u5408\u306b\u306f\u3001\u3069\u306e\u3088\u3046\u306a\u8981\u4ef6\u3092\u6e80\u305f\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/a><\/p>\n<p>\u4ee5\u4e0b\u3001\u8981\u4ef6\u306e\u5f15\u7528\u3067\u3059\u3002\u2193<\/p>\n<table class=\"table table-bordered datatable width80 bmg0\">\n<thead>\n<tr>\n<th class=\"center \" rowspan=\"2\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u96fb\u5b50\u8a08\u7b97\u6a5f\u51e6\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u6982\u8981\u3092\u8a18\u8f09\u3057\u305f\u66f8\u985e\u306e\u5099\u4ed8\u3051\uff08\u81ea\u793e\u958b\u767a\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u9650\u308a\u307e\u3059\u3002\uff09(\u898f\uff13<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>\u4e09\u30a4\u3001<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/05.gif\" alt=\"5\" width=\"15\" \/>\u4e03\u3001\uff18<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>)\u3000<span style=\"color: #ff0000;\">\u2192\u2605\u3010\u81ea\u793e\u30aa\u30ea\u30b8\u30ca\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u5834\u5408\u306e\u307f\u3001\u5fc5\u9808\u3002\u5e02\u8ca9\u30d3\u30b8\u30cd\u30b9\u30bd\u30d5\u30c8\u306e\u5834\u5408\u7b49\u306f\u4e0d\u8981\u3002\u3011\u4fdd\u5b58\u30b7\u30b9\u30c6\u30e0\uff08\u4fdd\u5b58\u6a5f\u80fd\uff09\u306e\u6982\u8981\u30fb\u64cd\u4f5c\u65b9\u6cd5\u306a\u3069<\/span><\/td>\n<\/tr>\n<tr>\n<td>\u2003\u898b\u8aad\u53ef\u80fd\u88c5\u7f6e\u306e\u5099\u4ed8\u3051\u7b49(\u898f\uff13<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>\u56db\u3001\uff18<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>)\u3000<span style=\"color: #ff0000;\">\u2192\u2605\u3010\u5fc5\u9808\u3011\u30d1\u30bd\u30b3\u30f3\u306a\u3069\u306ePDF\u7b49\u304c\u3088\u3081\u308b\u6a5f\u5668\u306e\u6e96\u5099<\/span><\/td>\n<\/tr>\n<tr>\n<td>\u2003\u691c\u7d22\u6a5f\u80fd\u306e\u78ba\u4fdd(\u898f\uff13<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>\u4e94\u3001<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/05.gif\" alt=\"5\" width=\"15\" \/>\u4e03\u3001\uff18<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>)\u3000<span style=\"color: #ff0000;\">\u2192\u2605\u3010\u5fc5\u9808\u3011\u300c\u65e5\u4ed8\u3001\u91d1\u984d\u3001\u53d6\u5f15\u5148\u300d\u304c\u3059\u3050\u306b\u691c\u7d22\u3067\u304d\u308b\u6a5f\u80fd\u306e\u6e96\u5099\u3002<\/span><\/td>\n<\/tr>\n<tr>\n<td>\u2003\u6b21\u306e\u3044\u305a\u308c\u304b\u306e\u63aa\u7f6e\u3092\u884c\u3046\uff08\u898f\uff18<img decoding=\"async\" src=\"https:\/\/www.nta.go.jp\/shared\/images\/decimal\/01.gif\" alt=\"1\" width=\"15\" \/>\uff09\u3000<span style=\"color: #ff0000;\">\u2192\u2605\u3010\u5fc5\u9808\u3011\u305f\u3060\u3001\u300c\u3044\u305a\u308c\u304b\u300d\u306a\u306e\u3067\u3001\u300c\uff14\u300d\u3060\u3051\u3067\u3082OK\u3002<\/span><\/p>\n<ol class=\"lst_none indent2em\">\n<li>\u4e00\u3000\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4ed8\u3055\u308c\u305f\u5f8c\u306e\u6388\u53d7<\/li>\n<li>\u4e8c\u3000\u6388\u53d7\u5f8c\u9045\u6ede\u306a\u304f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3059<\/li>\n<li>\u4e09\u3000\u30c7\u30fc\u30bf\u306e\u8a02\u6b63\u524a\u9664\u3092\u884c\u3063\u305f\u5834\u5408\u306b\u305d\u306e\u8a18\u9332\u304c\u6b8b\u308b\u30b7\u30b9\u30c6\u30e0\u53c8\u306f\u8a02\u6b63\u524a\u9664\u304c\u3067\u304d\u306a\u3044\u30b7\u30b9\u30c6\u30e0\u3092\u5229\u7528<\/li>\n<li>\u56db\u3000\u8a02\u6b63\u524a\u9664\u306e\u9632\u6b62\u306b\u95a2\u3059\u308b\u4e8b\u52d9\u51e6\u7406\u898f\u7a0b\u306e\u5099\u4ed8\u3051<\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u4e0a\u8a18\u306e\u8868\u306e\u3001\u4e00\u756a\u4e0b\u306e\u3001\u300c\u56db\u3000\u8a02\u6b63\u524a\u9664\u306e\u9632\u6b62\u306b\u95a2\u3059\u308b\u4e8b\u52d9\u51e6\u7406\u898f\u7a0b\u306e\u5099\u4ed8\u3051\u300d\u304c<br \/>\n\u524d\u8ff0\u3057\u305f\u3001<br \/>\n\u300e\u57fa\u672c\u7684\u306b\u306f\u3001\u300c\u3082\u3089\u3063\u305f\u30c7\u30fc\u30bf\uff08PDF\u7b49\uff09\u3092\u7d76\u5bfe\u306b\u7de8\u96c6\u30fb\u6539\u3056\u3093\u3057\u306a\u3044\u300d\u3068\u3044\u3046\u539f\u5247\u306b\u3057\u3066\u3001\u305d\u3046\u3044\u3063\u305f\u3001\u300c\u53d6\u308a\u6271\u3044\u306e\u30eb\u30fc\u30eb\uff08\uff1d\u793e\u5185\u898f\u7d04\u66f8\uff09\u300d\u300f<br \/>\n\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u305d\u306e\u3068\u304d\u3001\u300c\u7d76\u5bfe\u306b\u7de8\u96c6\u3055\u305b\u306a\u3044\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u300c\u52a9\u3051\u308b\u300d\u610f\u5473\u3067\u3001\u300c\u96fb\u5e33\u6cd5\u304c\u8a00\u3046\u3068\u3053\u308d\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u300d\u3001\u300c\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3068\u66f4\u65b0\u65e5\u4ed8\u300d\u3092\u8a18\u9332\u3057\u3066\u304a\u304f\u306e\u306f\uff11\u3064\u306e\u65b9\u6cd5\u3060\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3082\u3061\u308d\u3093\u3001Acrobat Reader\u3067\u7121\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3051\u308b\u65b9\u6cd5\u3082\u3088\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\uff1aAcrobat Reader\u3067\u7121\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3051\u305f\u5834\u5408\u306e\u8a3c\u62e0\uff1f\u306e\u30df\u30cb\u753b\u9762<br \/>\n\u3000\u3000\u3000\u3000\u2193<br \/>\n<a href=\"https:\/\/euc-access-excel-db.com\/00000WPIMG\/2023-06-12---22-13-04.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/euc-access-excel-db.com\/00000WPIMG\/2023-06-12---22-13-04.jpg\" alt=\"\" width=\"70%\" height=\"70%\" ><\/a><\/p>\n<p>\u305f\u3060\u3057\u3001\u7121\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306f\u3001\u3042\u304f\u307e\u3067\u3082\u3001<br \/>\n\u96fb\u5b50\u5951\u7d04\u66f8\u4ee5\u5916\u306e\u96fb\u5b50\u30c7\u30fc\u30bf\u306b\u3066\u3001<br \/>\n\u300c\u56db\u3000\u8a02\u6b63\u524a\u9664\u306e\u9632\u6b62\u306b\u95a2\u3059\u308b\u4e8b\u52d9\u51e6\u7406\u898f\u7a0b\u306e\u5099\u4ed8\u3051\u300d\u3001\u3092\u3059\u308b\u5834\u5408\u306e\u3001<br \/>\n\u300c\u5358\u306b\u3001\u3088\u308a\u6539\u3056\u3093\u3092\u4e88\u9632\u3059\u308b\u305f\u3081\u3060\u3051\u306e\u300d\u3001<br \/>\n\u300c\u88dc\u5b8c\u6a5f\u80fd\u300d\u3001<br \/>\n\u3068\u3057\u3066\u3067\u3057\u304b\u4f7f\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u300cAcrobat Reader\u3067\u7121\u6599\u3067\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3051\u308b\u65b9\u6cd5\u300d\u306f\u30bf\u30a4\u30e0\u30b5\u30fc\u30d0\u30fc\u304c\u56fd\u7a0e\u5e81\u304c\u8a8d\u3081\u306a\u3044\u30bf\u30a4\u30d7\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u6050\u308c\u3082\u3042\u308b\u305f\u3081\u3001\u96fb\u5b50\u5951\u7d04\u66f8\u306b\u306f\u4f7f\u3048\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3060\u304b\u3089\u3067\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u3082\u3057\u7121\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3051\u308b\u306a\u3089\u3001\u30a2\u30af\u30ed\u30d0\u30c3\u30c8\u3067\u306f\u306a\u304f\u3066\u3001\u300c\u307f\u3093\u306a\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u300d\u307f\u305f\u3044\u306a\u3082\u306e\u304c\u826f\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/ts.vector.co.jp\/\" target=\"_blank\" rel=\"noopener\">\u307f\u3093\u306a\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7<\/a><\/p>\n<p>Acrobat Reader\u306e\u7121\u6599\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3060\u3068\u3001\u7d50\u5c40\u3001\u3042\u3068\u306b\u306a\u3063\u3066\u3001<br \/>\n\u300c\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3060\u3068\u3001\u8981\u4ef6\u3092\u6e80\u305f\u3057\u305f\u3053\u3068\u306b\u306a\u3089\u306a\u3044\u306e\u3067\u3001\u3053\u3053\u306b\u4fdd\u5b58\u3057\u3066\u3042\u308bPDF\u306f\u5168\u90e8\u9055\u6cd5\u3067\u3059\u300d\u3001<br \/>\n\u3068\u8a00\u308f\u308c\u3066\u3057\u307e\u3046\u6050\u308c\u304c\u3042\u308a\u307e\u3059\u3002\u305e\u3063\u3068\u3057\u307e\u3059\u306d(^^)<\/p>\n<p>\u305d\u3046\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u5fc5\u8981\u3060\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>(01)\u96fb\u5b50\u5951\u7d04\u66f8\u306a\u3069\u306e\u6709\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u5fc5\u8981\u306a\u66f8\u985e\u306b\u306f\u3001<br \/>\n\u3000\u3000\u3057\u3063\u304b\u308a\u6709\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4ed8\u3051\u308b\u3002<br \/>\n\u3000\u3000\u7121\u6599\u306a\u3089\u3001\u300c<a href=\"https:\/\/ts.vector.co.jp\/\" target=\"_blank\" rel=\"noopener\">\u307f\u3093\u306a\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7<\/a>\u300d\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d3\u30b9\uff1f<\/p>\n<p>(02)\u96fb\u5b50\u5951\u7d04\u66f8\u4ee5\u5916\u306e\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4e0d\u8981\u306a\u66f8\u985e\u306b\u306f\u3001<br \/>\n\u3000\u3000\u793e\u5185\u898f\u7d04\u3067\u5bfe\u5fdc\u3057\u3001\u4fdd\u967a\uff08\u6539\u3056\u3093\u4e88\u9632\u7b56\uff09\u3068\u3057\u3066\u7121\u6599\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304b\u3001<br \/>\n\u3000\u3000\u5f8c\u8ff0\u306e\u3088\u3046\u306a\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u300c\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\uff0b\u66f4\u65b0\u65e5\u4ed8\u300d\u306a\u3069\u306e\u8a18\u9332\u3001<br \/>\n\u3000\u3000\u4fdd\u7ba1\u3057\u3066\u304a\u304f\u3068\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u4e0a\u8a18\u306e(02)\u306b\u4f7f\u3046\u305f\u3081\u306e\u30e2\u30ce\u3067\u3059\u3002<br \/>\n\uff08\u300c<a href=\"https:\/\/ts.vector.co.jp\/\" target=\"_blank\" rel=\"noopener\">\u307f\u3093\u306a\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7<\/a>\u300d\u306e\u3088\u3046\u306a\u300cWeb\u306b\u81ea\u793e\u306e\u66f8\u985e\u3092\u30a2\u30c3\u30d7\u3059\u308b\u3053\u3068\u81ea\u4f53\u304c\u5acc\u3060\u3001\u6016\u3044\u300d\u3001\u3068\u8a00\u3046\u5834\u5408\u3082\u3001\u4f7f\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4e88\u9632\u7b56\u3068\u3057\u3066\u3060\u3051\u3002\uff09<\/p>\n<p>\u3067\u306f\u3053\u308c\u4ee5\u4e0b\u306b\u3001\u300c\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u53d6\u5f97\u3059\u308b\u95a2\u6570\u306e\u3042\u308c\u3053\u308c\u300d\u3001<br \/>\n\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\uff08\u65e5\u4ed8\u3092\u4ed8\u52a0\u307e\u3067\u306f\u3057\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u3001\u305d\u306e\u90e8\u5206\u306f\u307e\u305f\u81ea\u4f5c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff09<\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cf\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u5272\u308a\u51fa\u3057\u306e\u5b9f\u884c\u7d50\u679c\u3092VBA\u5074\u306b\u53d7\u3051\u53d6\u308b\u65b9\u5f0f<br \/>\n\uff08\u203b\u53d7\u3051\u53d6\u308a\u5148\u304c\u300c\u914d\u5217\u300d\u306e\u65b9\u6cd5\uff09<\/p>\n<p>\uff08\u203b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3042\u3068\u3001\u305d\u306e\u7d50\u679c\u306e\u300c\u6570\u884c\u300d\u304b\u3089\u30cf\u30c3\u30b7\u30e5\u5024\u3060\u3051\u3092\u62bd\u51fa<br \/>\n\u3000\u3000\u3059\u308b\u30b3\u30fc\u30c9\u3082\u4e00\u7dd2\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002SHA256\u4ee5\u4e0a\u3067\u3082\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\uff09<\/p>\n<p>\u3053\u308c\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n\uff08API\u5229\u7528\u3067\u306e\u65b9\u6cd5\u306f\u3053\u3061\u3089\u2192<a href=\"http:\/\/su-u.jp\/juju\/%B5%A4%A4%DE%A4%B0%A4%EC%C6%FC%B5%AD\/2007-03-08.html\" target=\"_blank\" rel=\"noopener\">\u30b9\u30fc\u306e\u9053\u5177\u7bb1\/\u6c17\u307e\u3050\u308c\u65e5\u8a18\/2007-03-08<\/a>\uff09<\/p>\n<p>\u57fa\u672c\u3001\u3053\u306e\u65b9\u5f0f\u306f\u3001\u4e3b\u306b7\u30018\u300110\u300111\u3001\u3067\u4f7f\u3048\u307e\u3059\u3002<br \/>\nWindows2000SP4Pro\uff08\u4ed6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u672a\u78ba\u8a8d\uff09\u3084\u3001XP\u3001\u3067\u3082\u4f7f\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001<br \/>\n\u672a\u78ba\u8a8d\u3067\u3059\u3002\u4f7f\u3048\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u5f8c\u8ff0\u306e\u300cGetFileHashSha1()\u300d\u95a2\u6570\u3001\u300cGetFileHashSha1ForWin2000()\u300d\u95a2\u6570\u306e\u307b\u3046\u304c\u7c21\u5358\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u305d\u3053\u305d\u3053\u901f\u3044\u3067\u3059\u3002<br \/>\n\u306e\u3061\u306e\u300cAPI\u3092\u4f7f\u3046\u65b9\u6cd5\u300d\u306e2\u500d\u306f\u901f\u3044\u3067\u3059\u3002<br \/>\n\u300c.NetFrameWork3.5\u300d\u3092\u4f7f\u3046\u65b9\u6cd5\u3088\u308a\u306f\u82e5\u5e72\u9045\u3044\u304b\u3082\uff1f\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u306a\u304a\u3001\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u9ed2\u3044\u753b\u9762\u304c\u3061\u3089\u3064\u304d\u307e\u3059\u306e\u3067\u3001<br \/>\n\u305d\u308c\u304c\u5acc\u306a\u65b9\u306f\u300c.NetFrameWork3.5\u300d\u3092\u4f7f\u3046\u65b9\u6cd5\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u65b9\u6cd5\u306f\u3001Windows2000SP4Pro\uff08\u4ed6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u672a\u78ba\u8a8d\uff09\u3001XP\u306e\u5834\u5408\u3001<br \/>\n\u300cSHA1\u300d\u3057\u304b\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\nMD5\u3082\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u672a\u78ba\u8a8d\u3067\u3059\u3002<br \/>\n\uff087\u30848\u306f\u672a\u78ba\u8a8d\u3067\u3059\u3002Win10\u300111\u306a\u3089\u3001SHA256\u4ee5\u4e0a\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u8a08\u7b97\u304c\u3067\u304d\u307e\u3059\u3002\uff09<\/p>\n<p>\u305f\u3060\u3001\u300cSHA1\u300d\u306f\u3001Google\u306e\u3069\u3053\u304b\u306e\u30c1\u30fc\u30e0\u304c2017\u5e74\u306b\u3088\u3046\u3084\u304f\u7a81\u7834\u3057\u305f\u3001<br \/>\n\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u306e\u3067\u3001\u4e00\u822c\u306e\u4f1a\u793e\u3067\u3042\u308c\u3070\u305d\u3093\u306a\u529b\u304c\u3042\u308b\u4f1a\u793e\u306f\u5c11\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u304b\u3089\u3001<br \/>\n\u73fe\u5b9f\u7684\u306b\u306f\u300cSHA1\u300d\u3067\u5341\u5206\u3001\u300c\u539f\u672c\u4fdd\u8a3c\u300d\u306b\u306a\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u300cSHA1\u300d\u4ee5\u524d\u306e\u3001\u300cMD5\u300d\u3068\u3044\u3046\u3088\u308a\u8106\u5f31\u6027\u306e\u3042\u308b\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u65b9\u5f0f\u3067\u3059\u3089\u3001<br \/>\n\u300c\u5b9f\u969b\u306e\u88c1\u5224\u3067\u306f\u300d\u300c\u30d5\u30a1\u30a4\u30eb\u304c\u6539\u3056\u3093\u3055\u308c\u305f\u300d\u3068\u300c\u8a3c\u660e\u3059\u308b\u307b\u3046\u304c\u56f0\u96e3\u300d\u2026\u3001<br \/>\n\u3060\u305d\u3046\u3067\u3059\u3002<br \/>\n\u4e0b\u8a18\u306eURL\u306f\u3001\u305d\u306e\u3053\u3068\u304c\u66f8\u304b\u308c\u305fWeb\u30da\u30fc\u30b8\u3067\u3059\u304c\u3001<br \/>\n\u300cmhtml\u5f62\u5f0f\u306a\u3069\u3067\u306e\u4fdd\u5b58\u304c\u5fc5\u9808\u300d\u3068\u3044\u3046\u304f\u3089\u3044\u306e\u826f\u3044\u5185\u5bb9\u3067\u3059\u3002<br \/>\n\u662f\u975e\u3001\u4fdd\u5b58\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u2193<br \/>\n<a href=\"https:\/\/kigyou-fullsupport.com\/media\/column\/column-667\/\" target=\"_blank\" rel=\"noopener\">\uff29\uff34\u306e\u77e5\u8b58\u4e0d\u8db3\u306b\u3088\u308b\u5224\u6c7a\u9593\u9055\u3044\uff1f\uff0d\uff2d\uff24\uff15\u306e\u8106\u5f31\u6027<\/a><\/p>\n<p>\u57fa\u672c\u3001XP\u3067\u306f\u3001\u901a\u5e38\u306f\u3059\u3050\u306b\u306f\u4f7f\u3048\u306a\u3044\u304b\u3082\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001<br \/>\n\u300cWindows Server 2003 Service Pack 2 \u7ba1\u7406\u30c4\u30fc\u30eb \u30d1\u30c3\u30af (x86 \u30a8\u30c7\u30a3\u30b7\u30e7\u30f3\u7528)\u300d<br \/>\n<a href=\"https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=6315\" target=\"_blank\" rel=\"noopener\">https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=6315<\/a><br \/>\n\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001<br \/>\n\u52d5\u304f\u3088\u3046\u306b\u306a\u308b\u304b\u3082\uff1f\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u969b\u3001\u3059\u3079\u3066\u306ePC\u306b\u305d\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304f\u3066\u3082OK\u3067\u3059\u3002<br \/>\n\u3069\u308c\u304b\uff11\u3064\u306ePC\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5b8c\u4e86\u5f8c\u306b\u3001\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092<br \/>\n\uff12\u3064\u629c\u304d\u51fa\u3057\u3066\u3001\u4ed6\u306e\u30de\u30b7\u30f3\u306b\u306f\u3001\u305d\u308c\u3092\u30b3\u30d4\u30da\u3059\u308c\u3070OK\u3067\u3059\u3002<br \/>\n\uff08\u300cc:\\windows\\system32\u300d\u306b\u3002\uff09<\/p>\n<p>\u305d\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001<br \/>\n\u300cc:\\windows\\system32\u300d\u306e\u3001\u300ccertutil.exe\u300d\u3068\u300ccertadm.dll\u300d\u3067\u3059\u3002<\/p>\n<p>2000\u306e\u5834\u5408\u3082\u4f3c\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u3084\u308c\u307e\u3059\u3002<br \/>\n\uff08SP4\u306ePro\u7248\u3057\u304b\u78ba\u8a8d\u53d6\u308c\u3066\u307e\u305b\u3093\u3002\u5f8c\u8ff0\u306e\u300cGetFileHashSha1ForWin2000()\u300d\u95a2\u6570\u3067\u3059\u3002\uff09<\/p>\n<p>\u3067\u30012000SP4\u306ePro\u7248\u3067\u306f\u305d\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3059\u3067\u306b\u5165\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u304c\u3001<br \/>\n\u305f\u3060\u3057\u3001\u683c\u7d0d\u5834\u6240\uff08\u300cC:\\WINNT\\system32\\dllcache\u300d\uff09\u306bPATH\u304c<br \/>\n\u901a\u3063\u3066\u306a\u3044\u306e\u3067\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002<br \/>\n\u6a5f\u80fd\u3055\u305b\u308b\u306b\u306f\uff08\u300cC:\\WINNT\\system32\\dllcache\u300d\uff09\u306bPATH\u3092\u901a\u3057\u3066\u3001<br \/>\n\u4f59\u8a08\u306a\u540c\u540d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u3068\u3001\u4f7f\u3048\u308b\u3053\u3068\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\uff08PATH\u3092\u901a\u3059\u65b9\u6cd5\u306f\u5f8c\u8ff0\u3057\u307e\u3059\u3002\uff09<\/p>\n<p>\u305f\u3060\u3001\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306fPATH\u304c\u901a\u3063\u3066\u3044\u3066\u3082\u30012000\u7cfb\u3067\u3061\u3083\u3093\u3068\u52d5\u304f\u304b\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u3002<br \/>\n\u52d5\u304f\u304b\u3082\u3057\u308c\u306a\u3044\u3057\u3001\u52d5\u304b\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u306f\u3063\u304d\u308a\u3057\u3066\u3044\u307e\u3059\u306e\u306f\u3001\u5f8c\u8ff0\u306e\u300cGetFileHashSha1ForWin2000()\u300d\u95a2\u6570\u306e\u307b\u3046\u306a\u3089<br \/>\n\u78ba\u5b9f\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">'\r\n'\r\n'\r\nOption Explicit\r\n\r\n'\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u3001\u6307\u5b9a\u3057\u305f\u30bb\u30eb\u306b\u66f8\u304d\u51fa\u3059\u95a2\u6570\r\n'\r\n'\u547c\u3073\u51fa\u3057\u65b9\r\n'Call AddHashResult(\"\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\", \"\u30cf\u30c3\u30b7\u30e5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\", \u51fa\u529b\u5148\u306e\u5358\u4e00\u30bb\u30eb\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5f0f)\r\n'\r\n'\u3010\u4f8b\u3011\u2193\r\n'Call AddHashResult(\"d:\\1\\\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u30c6\u30b9\u30c801-01.pdf\", \"sha256\", ActiveSheet.Range(\"B5\"))\r\n\r\nFunction AddHashResult(s_FilePath As String, _\r\n                       s_HashStyle As String, _\r\n                       o_Cell As Range)\r\n\r\n    Dim v_HashResultAry As Variant\r\n    Dim s_Result01 As String\r\n    Dim s_Result02 As String\r\n    \r\n    v_HashResultAry = v_GetFileHash(s_FilePath, s_HashStyle)\r\n       \r\n    o_Cell.Value = v_HashResultAry(1)\r\n\r\nEnd Function\r\n\r\n\r\n'--------------------------------------------------------------------------------\r\n'\u5f15\u6570\u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\uff08\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u5024\uff09\u7b49\u3092\u3001\r\n'Variant\u578b\u306e1\u6b21\u5143\u914d\u5217\u3067\u8fd4\u3057\u307e\u3059\u3002\r\n'\r\n' s_FilePath\uff1a\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3002\u30c6\u30ad\u30b9\u30c8\u578b\u306e\u30ea\u30c6\u30e9\u30eb\u3067\u6307\u5b9a\u3002\r\n' s_HashAlgo\uff1a\u30cf\u30c3\u30b7\u30e5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u7a2e\u985e\u3002MD5,SHA1,SHA256\u306a\u3069\u3092\u30c6\u30ad\u30b9\u30c8\u578b\u306e\u30ea\u30c6\u30e9\u30eb\u3067\u6307\u5b9a\u3002\r\n' v_GetFileHash\uff1a\u30b3\u30de\u30f3\u30c9\u306e\u7d50\u679c\u304c\u914d\u5217\u3067\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002\r\n'\u3000\u3000\u8981\u7d20(0)\u306f\u691c\u8a3c\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u306a\u3069\u3001\u304c\u8fd4\u308a\u3001\r\n'\u3000\u3000\u8981\u7d20(1)\u306f\u691c\u8a3c\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3001\u304c\u8fd4\u308a\u307e\u3059\u3002\r\n'--------------------------------------------------------------------------------\r\nPublic Function v_GetFileHash(s_FilePath As String, s_HashAlgo As String) As Variant\r\n\r\n    Dim o_WSH As Object\r\n    Dim o_wshExec As Object\r\n    Dim s_Cmd As String\r\n    Dim s_Output As String\r\n\r\n    Set o_WSH = CreateObject(\"WScript.Shell\")\r\n    s_Cmd = \"certutil -hashfile \" &amp; _\r\n            \"\"\"\" &amp; s_FilePath &amp; \"\"\"\" &amp; _\r\n            \" \" &amp; s_HashAlgo &amp; _\r\n            \" | findstr \/V CertUtil | findstr \/V \" &amp; _\r\n            s_HashAlgo\r\n    \r\n    \r\n    Set o_wshExec = o_WSH.Exec(\"%ComSpec% \/c \" &amp; s_Cmd)\r\n\r\n    Do While o_wshExec.Status = 0\r\n        DoEvents\r\n    Loop\r\n\r\n    s_Output = o_wshExec.stdOut.ReadAll\r\n    \r\n    Dim s_OutptStr01 As String\r\n    Dim s_OutptStr02 As String\r\n    \r\n'    Stop\r\n    \r\n    s_OutptStr01 = Left(s_Output, InStr(1, s_Output, vbCrLf))\r\n    s_OutptStr01 = Replace(s_OutptStr01, vbCrLf, \"\", , , vbBinaryCompare)\r\n    s_OutptStr01 = Replace(s_OutptStr01, vbLf, \"\", , , vbBinaryCompare)\r\n    s_OutptStr01 = Replace(s_OutptStr01, vbCr, \"\", , , vbBinaryCompare)\r\n    \r\n    \r\n    s_OutptStr02 = Replace(s_Output, s_OutptStr01, \"\", , , vbBinaryCompare)\r\n    s_OutptStr02 = Replace(s_OutptStr02, vbCrLf, \"\", , , vbBinaryCompare)\r\n    s_OutptStr02 = Replace(s_OutptStr02, vbLf, \"\", , , vbBinaryCompare)\r\n    s_OutptStr02 = Replace(s_OutptStr02, vbCr, \"\", , , vbBinaryCompare)\r\n    \r\n    Set o_wshExec = Nothing\r\n    Set o_WSH = Nothing\r\n\r\n    v_GetFileHash = Array(s_OutptStr01, s_OutptStr02)\r\n\r\n'    Stop\r\nEnd Function\r\n\r\n\r\n\r\nSub GetHashResultAryTest01()\r\n\r\n    Dim s_FilePath      As String\r\n    Dim v_HashResultAry As Variant\r\n    \r\n    Let s_FilePath = \"d:\\1\\\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u30c6\u30b9\u30c801-01.pdf\"\r\n    v_HashResultAry = v_GetFileHash(s_FilePath, \"sha256\")\r\n\r\n    Dim s_01 As String\r\n    Dim s_02 As String\r\n    \r\n    s_01 = v_HashResultAry(0)\r\n    s_02 = v_HashResultAry(1)\r\n    \r\n    Debug.Print InStr(1, v_HashResultAry(0), vbCrLf)\r\n    Debug.Print InStr(1, v_HashResultAry(1), vbCrLf)\r\n    Debug.Print s_01\r\n    Debug.Print s_02\r\n    \r\nEnd Sub\r\n\r\n\r\n\r\n\r\n'\r\n'\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n\u25cfPATH\u3092\u901a\u3059\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n<p>\u5f8c\u8ff0\u306e\u300cPATH_Add01()\u300d\u306b\u3066\u3001\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cfAPI\u3092\u4f7f\u3046\u65b9\u6cd532bit\u7248\uff0832bit\u7248\u306eExcel\u3001Word\u306a\u3069\u306e\u307f\u3067\u3057\u304b\u4f7f\u3048\u307e\u305b\u3093\u3002\uff09<br \/>\n\uff08\u203b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u5229\u7528\u306e\u65b9\u6cd5\u3088\u3046\u306b\u3001\u53d7\u3051\u305f\u7d50\u679c\u304c\u8907\u6570\u884c\u306b\u306a\u3089\u306a\u3044\u3067\u3059\u3002<br \/>\n\u3000\u3000\u666e\u901a\u306e\u95a2\u6570\u3068\u540c\u3058\u304f\u3001\u6587\u5b57\u5217\u578b\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u304c\u307e\u3093\u307e\u3067\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002\uff09<\/p>\n<p>\u4ee5\u4e0b\u3001\u300c<a href=\"http:\/\/su-u.jp\/juju\/%B5%A4%A4%DE%A4%B0%A4%EC%C6%FC%B5%AD\/2007-03-08.html\" target=\"_blank\" rel=\"noopener\">\u30b9\u30fc\u306e\u9053\u5177\u7bb1\/\u6c17\u307e\u3050\u308c\u65e5\u8a18\/2007-03-08<\/a>\u300d\u304c\u6d88\u3048\u3061\u3083\u3046\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u30e1\u30e2\u5f15\u7528\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u300c\u9045\u3044\u300d\u3067\u3059\u304c\u3001Windows2000SP4Pro\u3067\u3082XPsp2\u306a\u3069\u3067\u3082\u4f7f\u3048\u307e\u3059\u3002<br \/>\n\u4f55\u306e\u8ffd\u52a0\u306edll\u3084exe\u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u8981\u3089\u306a\u3044\u306e\u3067\u3001\u300c\u5bb9\u91cf\u304c\uff11MB\u4ee5\u4e0b\u306e\u5c0f\u3055\u306a\u30d5\u30a1\u30a4\u30eb\u3070\u304b\u308a\u300d\u306e\u3068\u304d\u306f\u3001\u3053\u308c\u3067\u5341\u5206\u9593\u306b\u5408\u3044\u307e\u3059\u3002<\/p>\n<p>\u5bb9\u91cf\u304c\uff11MB\u4ee5\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\uff08\u7279\u306b\uff12MB\u4ee5\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\uff09\u304c\u5897\u3048\u3066\u304d\u305f\u3089\u3001<br \/>\n\u300ccertutil.exe\u300d\u3068\u300ccertadm.dll\u300d\u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u3066\u306e\u3001<br \/>\n\u300c\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u5272\u51fa\u3057\u306e\u5b9f\u884c\u7d50\u679c\u3092VBA\u5074\u306b\u53d7\u3051\u53d6\u308b\u65b9\u5f0f\u300d<br \/>\n\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\uff08\u3053\u306e\u65b9\u5f0f\u306fXP\u3084Win10\u306a\u3069\u3067\u4f7f\u3048\u307e\u3059\u304c\u3001\u5b9f\u884c\u7d50\u679c\u306e\u884c\u6570\u304c\u7570\u306a\u308b\u305f\u3081\u3001<br \/>\n\u3000\u305d\u308c\u305e\u308c\u3001\u3000\u5b9f\u884c\u7d50\u679c\u3092VBA\u5074\u306b\u53d7\u3051\u53d6\u308b\u3068\u304d\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5c11\u3057<br \/>\n\u3000\u5909\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\nOption Explicit\r\n\r\nPrivate Declare Function CryptAcquireContext Lib \"advapi32.dll\" Alias \"CryptAcquireContextA\" _\r\n                            (ByRef phProv As Long, ByVal pszContainer As String, ByVal pszProvider As String, _\r\n                             ByVal dwProvType As Long, ByVal dwFlags As Long) As Long\r\nPrivate Declare Function CryptReleaseContext Lib \"advapi32.dll\" _\r\n                            (ByVal hProv As Long, ByVal dwFlags As Long) As Long\r\nPrivate Declare Function CryptCreateHash Lib \"advapi32.dll\" _\r\n                            (ByVal hProv As Long, ByVal Algid As Long, ByVal hKey As Long, ByVal dwFlags As Long, _\r\n                             ByRef phHash As Long) As Long\r\nPrivate Declare Function CryptDestroyHash Lib \"advapi32.dll\" _\r\n                            (ByVal hHash As Long) As Long\r\nPrivate Declare Function CryptHashData Lib \"advapi32.dll\" _\r\n                            (ByVal hHash As Long, pbData As Any, ByVal cbData As Long, ByVal dwFlags As Long) As Long\r\nPrivate Declare Function CryptGetHashParam Lib \"advapi32.dll\" _\r\n                            (ByVal hHash As Long, ByVal dwParam As Long, pbData As Any, ByRef pcbData As Long, _\r\n                             ByVal dwFlags As Long) As Long\r\n\r\nPrivate Const PROV_RSA_FULL   As Long = 1\r\nPrivate Const PROV_RSA_AES    As Long = 24\r\nPrivate Const CRYPT_VERIFYCONTEXT As Long = &HF0000000\r\n\r\nPrivate Const HP_HASHVAL      As Long = 2\r\nPrivate Const HP_HASHSIZE     As Long = 4\r\n\r\nPrivate Const ALG_TYPE_ANY    As Long = 0\r\nPrivate Const ALG_CLASS_HASH  As Long = 32768\r\n\r\nPrivate Const ALG_SID_MD2     As Long = 1\r\nPrivate Const ALG_SID_MD4     As Long = 2\r\nPrivate Const ALG_SID_MD5     As Long = 3\r\nPrivate Const ALG_SID_SHA     As Long = 4\r\nPrivate Const ALG_SID_SHA_256 As Long = 12\r\nPrivate Const ALG_SID_SHA_512 As Long = 14\r\n\r\nPrivate Const CALG_MD2        As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD2)\r\nPrivate Const CALG_MD4        As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD4)\r\nPrivate Const CALG_MD5        As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD5)\r\nPrivate Const CALG_SHA        As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA)\r\nPrivate Const CALG_SHA_256    As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA_256)\r\nPrivate Const CALG_SHA_512    As Long = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA_512)\r\n\r\n' Create Hash\r\nPrivate Function CreateHash(abytData() As Byte, ByVal lngAlgID As Long) As String\r\n    Dim hProv As Long, hHash As Long\r\n    Dim abytHash(0 To 63) As Byte\r\n    Dim lngLength As Long\r\n    Dim lngResult As Long\r\n    Dim strHash As String\r\n    Dim i As Long\r\n    strHash = \"\"\r\n    If CryptAcquireContext(hProv, vbNullString, vbNullString, _\r\n                           IIf(lngAlgID >= CALG_SHA_256, PROV_RSA_AES, PROV_RSA_FULL), _\r\n                           CRYPT_VERIFYCONTEXT) <> 0& Then\r\n        If CryptCreateHash(hProv, lngAlgID, 0&, 0&, hHash) <> 0& Then\r\n            lngLength = UBound(abytData()) - LBound(abytData()) + 1\r\n            If lngLength > 0 Then lngResult = CryptHashData(hHash, abytData(LBound(abytData())), lngLength, 0&) _\r\n                             Else lngResult = CryptHashData(hHash, ByVal 0&, 0&, 0&)\r\n            If lngResult <> 0& Then\r\n                lngLength = UBound(abytHash()) - LBound(abytHash()) + 1\r\n                If CryptGetHashParam(hHash, HP_HASHVAL, abytHash(LBound(abytHash())), lngLength, 0&) <> 0& Then\r\n                    For i = 0 To lngLength - 1\r\n                        strHash = strHash & Right$(\"0\" & Hex$(abytHash(LBound(abytHash()) + i)), 2)\r\n                    Next\r\n                End If\r\n            End If\r\n            CryptDestroyHash hHash\r\n        End If\r\n        CryptReleaseContext hProv, 0&\r\n    End If\r\n    CreateHash = LCase$(strHash)\r\n    \r\n    Debug.Print strHash\r\n    \r\nEnd Function\r\n\r\n' Create Hash From String(Shift_JIS)\r\nPrivate Function CreateHashString(ByVal strData As String, ByVal lngAlgID As Long) As String\r\n    CreateHashString = CreateHash(StrConv(strData, vbFromUnicode), lngAlgID)\r\nEnd Function\r\n\r\n' Create Hash From File\r\nPrivate Function CreateHashFile(ByVal strFileName As String, ByVal lngAlgID As Long) As String\r\n    Dim abytData() As Byte\r\n    Dim intFile As Integer\r\n    Dim lngError As Long\r\n    On Error Resume Next\r\n        If Len(Dir(strFileName)) > 0 Then\r\n            intFile = FreeFile\r\n            Open strFileName For Binary Access Read Shared As #intFile\r\n            abytData() = InputB(LOF(intFile), #intFile)\r\n            Close #intFile\r\n        End If\r\n        lngError = Err.Number\r\n    On Error GoTo 0\r\n    If lngError = 0 Then CreateHashFile = CreateHash(abytData(), lngAlgID) _\r\n                    Else CreateHashFile = \"\"\r\nEnd Function\r\n\r\n' MD5\r\nPublic Function CreateMD5Hash(abytData() As Byte) As String\r\n    CreateMD5Hash = CreateHash(abytData(), CALG_MD5)\r\nEnd Function\r\nPublic Function CreateMD5HashString(ByVal strData As String) As String\r\n    CreateMD5HashString = CreateHashString(strData, CALG_MD5)\r\nEnd Function\r\nPublic Function CreateMD5HashFile(ByVal strFileName As String) As String\r\n    CreateMD5HashFile = CreateHashFile(strFileName, CALG_MD5)\r\nEnd Function\r\n\r\n' SHA-1\r\nPublic Function CreateSHA1Hash(abytData() As Byte) As String\r\n    CreateSHA1Hash = CreateHash(abytData(), CALG_SHA)\r\nEnd Function\r\nPublic Function CreateSHA1HashString(ByVal strData As String) As String\r\n    CreateSHA1HashString = CreateHashString(strData, CALG_SHA)\r\nEnd Function\r\nPublic Function CreateSHA1HashFile(ByVal strFileName As String) As String\r\n    CreateSHA1HashFile = CreateHashFile(strFileName, CALG_SHA)\r\nEnd Function\r\n\r\n' SHA-256\r\nPublic Function CreateSHA256Hash(abytData() As Byte) As String\r\n    CreateSHA256Hash = CreateHash(abytData(), CALG_SHA_256)\r\nEnd Function\r\nPublic Function CreateSHA256HashString(ByVal strData As String) As String\r\n    CreateSHA256HashString = CreateHashString(strData, CALG_SHA_256)\r\nEnd Function\r\nPublic Function CreateSHA256HashFile(ByVal strFileName As String) As String\r\n    CreateSHA256HashFile = CreateHashFile(strFileName, CALG_SHA_256)\r\nEnd Function\r\n\r\n' SHA-512\r\nPublic Function CreateSHA512Hash(abytData() As Byte) As String\r\n    CreateSHA512Hash = CreateHash(abytData(), CALG_SHA_512)\r\nEnd Function\r\nPublic Function CreateSHA512HashString(ByVal strData As String) As String\r\n    CreateSHA512HashString = CreateHashString(strData, CALG_SHA_512)\r\nEnd Function\r\nPublic Function CreateSHA512HashFile(ByVal strFileName As String) As String\r\n    CreateSHA512HashFile = CreateHashFile(strFileName, CALG_SHA_512)\r\nEnd Function\r\n\r\n\r\n'\r\n'\r\n<\/pre>\n<p>\u25cfAPI\u3092\u4f7f\u3046\u65b9\u6cd564bit\u7248\uff0864bit\u7248\u306eExcel\u3001Word\u306a\u3069\u306e\u307f\u3067\u3057\u304b\u4f7f\u3048\u307e\u305b\u3093\u3002\uff09<br \/>\n\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u309264bit\u7248\u306b\u76f4\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u300c\u9045\u3044\u300d\u3067\u3059\u3002<br \/>\n\u307e\u305f\u300164bit\u306a\u306e\u3067\u3001XPSp2\u3084Windows2000SP4Pro\u306a\u3069\u306e\u3046\u306132bit\u306eOS\u3067\u306f\u52d5\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\nOption Explicit\r\n\r\nPrivate Declare PtrSafe Function CryptAcquireContext Lib \"advapi32.dll\" Alias \"CryptAcquireContextA\" _\r\n                            (ByRef phProv AS LongPtr, ByVal pszContainer As String, ByVal pszProvider As String, _\r\n                             ByVal dwProvType AS LongPtr, ByVal dwFlags AS LongPtr) AS LongPtr\r\nPrivate Declare PtrSafe Function CryptReleaseContext Lib \"advapi32.dll\" _\r\n                            (ByVal hProv AS LongPtr, ByVal dwFlags AS LongPtr) AS LongPtr\r\nPrivate Declare PtrSafe Function CryptCreateHash Lib \"advapi32.dll\" _\r\n                            (ByVal hProv AS LongPtr, ByVal Algid AS LongPtr, ByVal hKey AS LongPtr, ByVal dwFlags AS LongPtr, _\r\n                             ByRef phHash AS LongPtr) AS LongPtr\r\nPrivate Declare PtrSafe Function CryptDestroyHash Lib \"advapi32.dll\" _\r\n                            (ByVal hHash AS LongPtr) AS LongPtr\r\nPrivate Declare PtrSafe Function CryptHashData Lib \"advapi32.dll\" _\r\n                            (ByVal hHash AS LongPtr, pbData As Any, ByVal cbData AS LongPtr, ByVal dwFlags AS LongPtr) AS LongPtr\r\nPrivate Declare PtrSafe Function CryptGetHashParam Lib \"advapi32.dll\" _\r\n                            (ByVal hHash AS LongPtr, ByVal dwParam AS LongPtr, pbData As Any, ByRef pcbData AS LongPtr, _\r\n                             ByVal dwFlags AS LongPtr) AS LongPtr\r\n\r\nPrivate Const PROV_RSA_FULL   AS LongPtr = 1\r\nPrivate Const PROV_RSA_AES    AS LongPtr = 24\r\nPrivate Const CRYPT_VERIFYCONTEXT AS LongPtr = &HF0000000\r\n\r\nPrivate Const HP_HASHVAL      AS LongPtr = 2\r\nPrivate Const HP_HASHSIZE     AS LongPtr = 4\r\n\r\nPrivate Const ALG_TYPE_ANY    AS LongPtr = 0\r\nPrivate Const ALG_CLASS_HASH  AS LongPtr = 32768\r\n\r\nPrivate Const ALG_SID_MD2     AS LongPtr = 1\r\nPrivate Const ALG_SID_MD4     AS LongPtr = 2\r\nPrivate Const ALG_SID_MD5     AS LongPtr = 3\r\nPrivate Const ALG_SID_SHA     AS LongPtr = 4\r\nPrivate Const ALG_SID_SHA_256 AS LongPtr = 12\r\nPrivate Const ALG_SID_SHA_384 AS LongPtr = 13\r\nPrivate Const ALG_SID_SHA_512 AS LongPtr = 14\r\n\r\nPrivate Const CALG_MD2        AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD2)\r\nPrivate Const CALG_MD4        AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD4)\r\nPrivate Const CALG_MD5        AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD5)\r\nPrivate Const CALG_SHA        AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA)\r\nPrivate Const CALG_SHA_256    AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA_256)\r\nPrivate Const CALG_SHA_384    AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA_384)\r\nPrivate Const CALG_SHA_512    AS LongPtr = (ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA_512)\r\n\r\n\r\n' Create Hash\r\nPrivate Function CreateHash(abytData() As Byte, ByVal lngAlgID As Long) As String\r\n    Dim hProv As Long, hHash As Long\r\n    Dim abytHash(0 To 63) As Byte\r\n    Dim lngLength As Long\r\n    Dim lngResult As Long\r\n    Dim strHash As String\r\n    Dim i As Long\r\n    strHash = \"\"\r\n    If CryptAcquireContext(hProv, vbNullString, vbNullString, _\r\n                           IIf(lngAlgID >= CALG_SHA_256, PROV_RSA_AES, PROV_RSA_FULL), _\r\n                           CRYPT_VERIFYCONTEXT) <> 0& Then\r\n        If CryptCreateHash(hProv, lngAlgID, 0&, 0&, hHash) <> 0& Then\r\n            lngLength = UBound(abytData()) - LBound(abytData()) + 1\r\n            If lngLength > 0 Then lngResult = CryptHashData(hHash, abytData(LBound(abytData())), lngLength, 0&) _\r\n                             Else lngResult = CryptHashData(hHash, ByVal 0&, 0&, 0&)\r\n            If lngResult <> 0& Then\r\n                lngLength = UBound(abytHash()) - LBound(abytHash()) + 1\r\n                If CryptGetHashParam(hHash, HP_HASHVAL, abytHash(LBound(abytHash())), lngLength, 0&) <> 0& Then\r\n                    For i = 0 To lngLength - 1\r\n                        strHash = strHash & Right$(\"0\" & Hex$(abytHash(LBound(abytHash()) + i)), 2)\r\n                    Next\r\n                End If\r\n            End If\r\n            CryptDestroyHash hHash\r\n        End If\r\n        CryptReleaseContext hProv, 0&\r\n    End If\r\n    CreateHash = LCase$(strHash)\r\n    Debug.Print strHash\r\n    \r\nEnd Function\r\n\r\n' Create Hash From String(Shift_JIS)\r\nPrivate Function CreateHashString(ByVal strData As String, ByVal lngAlgID As Long) As String\r\n    CreateHashString = CreateHash(StrConv(strData, vbFromUnicode), lngAlgID)\r\nEnd Function\r\n\r\n' Create Hash From File\r\nPrivate Function CreateHashFile(ByVal strFileName As String, ByVal lngAlgID As Long) As String\r\n    Dim abytData() As Byte\r\n    Dim intFile As Integer\r\n    Dim lngError As Long\r\n    On Error Resume Next\r\n        If Len(Dir(strFileName)) > 0 Then\r\n            intFile = FreeFile\r\n            Open strFileName For Binary Access Read Shared As #intFile\r\n            abytData() = InputB(LOF(intFile), #intFile)\r\n            Close #intFile\r\n        End If\r\n        lngError = Err.Number\r\n    On Error GoTo 0\r\n    If lngError = 0 Then CreateHashFile = CreateHash(abytData(), lngAlgID) _\r\n                    Else CreateHashFile = \"\"\r\nEnd Function\r\n\r\n' MD5\r\nPublic Function CreateMD5Hash(abytData() As Byte) As String\r\n    CreateMD5Hash = CreateHash(abytData(), CALG_MD5)\r\nEnd Function\r\nPublic Function CreateMD5HashString(ByVal strData As String) As String\r\n    CreateMD5HashString = CreateHashString(strData, CALG_MD5)\r\nEnd Function\r\nPublic Function CreateMD5HashFile(ByVal strFileName As String) As String\r\n    CreateMD5HashFile = CreateHashFile(strFileName, CALG_MD5)\r\nEnd Function\r\n\r\n' SHA-1\r\nPublic Function CreateSHA1Hash(abytData() As Byte) As String\r\n    CreateSHA1Hash = CreateHash(abytData(), CALG_SHA)\r\nEnd Function\r\nPublic Function CreateSHA1HashString(ByVal strData As String) As String\r\n    CreateSHA1HashString = CreateHashString(strData, CALG_SHA)\r\nEnd Function\r\nPublic Function CreateSHA1HashFile(ByVal strFileName As String) As String\r\n    CreateSHA1HashFile = CreateHashFile(strFileName, CALG_SHA)\r\nEnd Function\r\n\r\n' SHA-256\r\nPublic Function CreateSHA256Hash(abytData() As Byte) As String\r\n    CreateSHA256Hash = CreateHash(abytData(), CALG_SHA_256)\r\nEnd Function\r\nPublic Function CreateSHA256HashString(ByVal strData As String) As String\r\n    CreateSHA256HashString = CreateHashString(strData, CALG_SHA_256)\r\nEnd Function\r\nPublic Function CreateSHA256HashFile(ByVal strFileName As String) As String\r\n    CreateSHA256HashFile = CreateHashFile(strFileName, CALG_SHA_256)\r\nEnd Function\r\n\r\n' SHA-512\r\nPublic Function CreateSHA512Hash(abytData() As Byte) As String\r\n    CreateSHA512Hash = CreateHash(abytData(), CALG_SHA_512)\r\nEnd Function\r\nPublic Function CreateSHA512HashString(ByVal strData As String) As String\r\n    CreateSHA512HashString = CreateHashString(strData, CALG_SHA_512)\r\nEnd Function\r\nPublic Function CreateSHA512HashFile(ByVal strFileName As String) As String\r\n    CreateSHA512HashFile = CreateHashFile(strFileName, CALG_SHA_512)\r\nEnd Function\r\n\r\n'\r\n'\r\n<\/pre>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cf.NET FrameWork3.5\u3092\u5229\u7528\u3057\u305f\u65b9\u6cd5\uff08XP\u4ee5\u964d\uff1f\u3067\u4f7f\u3048\u308b\uff1f\uff09<br \/>\n\uff08\u203b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3082API\u3082\u4f7f\u308f\u305a\u306b\u3001\u300c.NET FrameWork3.5\u300d\u3092\u4f7f\u3063\u305f\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n\u3000\u3000Win10\u4ee5\u4e0a\u306a\u3069\u306a\u3089\u3001\u3053\u306e\u65b9\u5f0f\u304c\u4e00\u756a\u3044\u3044\u304b\u3082\uff1f\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u3000\u3000\u3082\u3057\u304b\u3057\u305f\u3089\u3001Windows7\u4ee5\u4e0a\u306a\u3089\u3001\uff1f\u3068\u3044\u3046\u3053\u3068\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n   \u300c.NET FrameWork3.5\u300d\u304c\u5165\u3063\u3066\u3055\u3048\u3059\u308c\u3070\u3044\u3044\u306e\u3067\u3002\uff09<\/p>\n<p>\u52d5\u4f5c\u901f\u5ea6\u304c\u524d\u8ff0\u306e\u65b9\u6cd5\u3088\u308a\u3082\u901f\u3044\u6c17\u304c\u3057\u307e\u3059\u3002<br \/>\n\uff08\u300cFile2SHA1$\u300d\u95a2\u6570\u306a\u3069\u3002\uff09<\/p>\n<p><a href=\"https:\/\/www.google.com\/search?q=VBA+System.Security.Cryptography+%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5+%E8%A8%88%E7%AE%97&rlz=1C1AGAK_jaJP986JP986&oq=VBA+System.Security.Cryptography+%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5+%E8%A8%88%E7%AE%97&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIKCAEQABiiBBiJBTIKCAIQABiABBiiBNIBCTEyMjY1ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8\" target=\"_blank\" rel=\"noopener\">https:\/\/www.google.com\/search?q=VBA+System.Security.Cryptography+%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5+%E8%A8%88%E7%AE%97&rlz=1C1AGAK_jaJP986JP986&oq=VBA+System.Security.Cryptography+%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5+%E8%A8%88%E7%AE%97&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIKCAEQABiiBBiJBTIKCAIQABiABBiiBNIBCTEyMjY1ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8<\/a><\/p>\n<p><a href=\"https:\/\/www.se-japan.com\/memo\/vbscript\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.se-<a href=\"https:\/\/blog.nekonium.com\/vba-hash\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.nekonium.com\/vba-hash\/<\/a><\/p>\n<p>\u300c.NET Framework 3.5\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002\u300d<br \/>\n\u3068\u3042\u308b\u306e\u3067\u3001\u305d\u308c\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u3066\u3001<br \/>\n\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u6a5f\u80fd\u300d\u306e\u300cWindows\u306e\u6a5f\u80fd\u306e\u6709\u52b9\u5316\u307e\u305f\u306f\u7121\u52b9\u5316\u300d\u306b\u3066<br \/>\n\u6709\u52b9\u306b\u306a\u3063\u3066\u306a\u3044\u3068\u30c0\u30e1\u3063\u307d\u3044\u3067\u3059\u3002<\/p>\n<p>\u300c.NET Framework 3.5\u3092\u6709\u52b9\u306b\u3059\u308b\u65b9\u6cd5\u300d<br \/>\n<a href=\"https:\/\/www.depthbomb.net\/?p=8611#toc3\" target=\"_blank\" rel=\"noopener\">https:\/\/www.depthbomb.net\/?p=8611#toc3<\/a><\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30bb\u30f3\u30bf\u30fc\u306e\u3001<br \/>\n\u300c.NET Framework 3.5 Service Pack 1 (\u30d5\u30eb \u30d1\u30c3\u30b1\u30fc\u30b8\uff1a\uff12\uff13\uff11MB\uff1a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\u80fd\uff09\u300d<br \/>\n<a href=\"https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=25150\" target=\"_blank\" rel=\"noopener\">https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=25150<\/a> \u3084<br \/>\n<a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=122089\" target=\"_blank\" rel=\"noopener\">http:\/\/go.microsoft.com\/fwlink\/?LinkId=122089<\/a> \u306b\u306f\u3001<br \/>\n\u30b7\u30b9\u30c6\u30e0\u5fc5\u8981\u6761\u4ef6\u306b<br \/>\n\u300c\u5bfe\u5fdc\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0 Windows Server 2003, Windows Server 2008, Windows Vista, Windows XP\u300d<br \/>\n\u3068\u3042\u308b\u306e\u3067\u3001\u3082\u3057\u304b\u3057\u305f\u3089\u3001XP\u3067\u3082\u884c\u3051\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\n\r\n'\u2605\u30d5\u30a1\u30a4\u30eb\u306b\u4f7f\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\r\n\r\nOption Explicit\r\n\r\n\r\nPrivate Const SHA1_LENGTH = 20\r\nPrivate Const SHA1_LENGTH_AS_STRING = 40\r\nPrivate Const SHA256_LENGTH = 32\r\nPrivate Const SHA256_LENGTH_AS_STRING = 64\r\n\r\nPrivate objUTF8 As Object\r\nPrivate objSHA256 As Object\r\nPrivate objSHA1 As Object\r\n\r\n'\u6587\u5b57\u5217\u304b\u3089\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\u3059\u308b\u95a2\u6570\r\nPublic Function String2SHA256$(str$)\r\n\r\n    '\u5fc5\u8981\u306a\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u3066\u30a8\u30f3\u30b3\u30fc\u30c9\r\n    If objUTF8 Is Nothing Then\r\n        Set objUTF8 = CreateObject(\"System.Text.UTF8Encoding\")\r\n    End If\r\n    Dim code() As Byte\r\n    code = objUTF8.GetBytes_4(str)\r\n\r\n    '\u5fc5\u8981\u306a\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u3066\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\r\n    If objSHA256 Is Nothing Then\r\n        Set objSHA256 = CreateObject(\"System.Security.Cryptography.SHA256Managed\")\r\n    End If\r\n    Dim hashValue() As Byte\r\n    hashValue = objSHA256.ComputeHash_2(code)\r\n\r\n    '16\u9032\u6cd5\u8868\u793a\u306b\u5909\u63db\r\n    Dim description As String * SHA256_LENGTH_AS_STRING\r\n    Dim i&\r\n    For i = 0 To SHA256_LENGTH - 1\r\n        Mid(description, i * 2 + 1) = Right(\"0\" & Hex(hashValue(i)), 2)\r\n    Next i\r\n\r\n    String2SHA256 = description\r\n\r\nEnd Function\r\n\r\n\r\n'\u30d5\u30a1\u30a4\u30eb(\u306e\u30d5\u30eb\u30d1\u30b9)\u304b\u3089\u300cSHA256\u300d\u306e\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\u3059\u308b\u95a2\u6570\r\nPublic Function File2SHA256$(fullPath$)\r\n\r\n    '\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\r\n    Dim targetFileExists As Boolean\r\n    targetFileExists = Len(Dir(fullPath)) <> 0\r\n    If Not targetFileExists Then GoTo NoSuchFile\r\n\r\n    '\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\r\n    Dim buff() As Byte\r\n    Dim ff&\r\n    ff = FreeFile\r\n    Open fullPath For Binary Lock Read As #ff\r\n    ReDim buff(LOF(ff) - 1)\r\n    Get #ff, , buff\r\n    Close #ff\r\n\r\n    '\u5fc5\u8981\u306a\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u3066\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\r\n    If objSHA256 Is Nothing Then\r\n        Set objSHA256 = CreateObject(\"System.Security.Cryptography.SHA256Managed\")\r\n    End If\r\n    Dim hashValue() As Byte\r\n    hashValue = objSHA256.ComputeHash_2(buff)\r\n\r\n    '16\u9032\u6cd5\u8868\u793a\u306b\u5909\u63db\r\n    Dim description As String * SHA256_LENGTH_AS_STRING\r\n    Dim i&\r\n    For i = 0 To SHA1_LENGTH - 1\r\n        Mid(description, i * 2 + 1) = Right(\"0\" & Hex(hashValue(i)), 2)\r\n    Next i\r\n\r\n    File2SHA256 = description\r\nExit Function\r\n\r\nNoSuchFile:\r\n    MsgBox \"\u305d\u3093\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u3044\u3088\u3002\"\r\nEnd Function\r\n\r\n\r\n'\u30d5\u30a1\u30a4\u30eb(\u306e\u30d5\u30eb\u30d1\u30b9)\u304b\u3089\u300cSHA1\u300d\u306e\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\u3059\u308b\u95a2\u6570\r\nPublic Function File2SHA1$(fullPath$)\r\n\r\n    '\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\r\n    Dim targetFileExists As Boolean\r\n    targetFileExists = Len(Dir(fullPath)) <> 0\r\n    If Not targetFileExists Then GoTo NoSuchFile\r\n\r\n    '\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\r\n    Dim buff() As Byte\r\n    Dim ff&\r\n    ff = FreeFile\r\n    Open fullPath For Binary Lock Read As #ff\r\n    ReDim buff(LOF(ff) - 1)\r\n    Get #ff, , buff\r\n    Close #ff\r\n\r\n    '\u5fc5\u8981\u306a\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u3066\u30cf\u30c3\u30b7\u30e5\u3092\u8a08\u7b97\r\n    If objSHA1 Is Nothing Then\r\n        Set objSHA1 = CreateObject(\"System.Security.Cryptography.SHA1Managed\")\r\n    End If\r\n    Dim hashValue() As Byte\r\n    hashValue = objSHA1.ComputeHash_2(buff)\r\n\r\n    '16\u9032\u6cd5\u8868\u793a\u306b\u5909\u63db\r\n    Dim description As String * SHA1_LENGTH_AS_STRING\r\n    Dim i&\r\n    For i = 0 To SHA1_LENGTH - 1\r\n        Mid(description, i * 2 + 1) = Right(\"0\" & Hex(hashValue(i)), 2)\r\n    Next i\r\n\r\n    File2SHA1 = description\r\nExit Function\r\n\r\nNoSuchFile:\r\n    MsgBox \"\u305d\u3093\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u3044\u3088\u3002\"\r\nEnd Function\r\n\r\n\r\n\r\n==================================================\r\n\r\n\r\n'\u2605\u30d5\u30a1\u30a4\u30eb\u306b\u4f7f\u3048\u308b\u304b\u3069\u3046\u304b\u308f\u304b\u3089\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\r\n\r\n\r\nOption Explicit\r\n\r\nSub test()\r\n    \r\n   Debug.Print UCase(HASH_SHA1(\"D:\\1\\123.accdb\"))\r\n\r\n   Call CreateSHA1HashFile(\"D:\\1\\123.accdb\")\r\n   \r\nEnd Sub\r\n\r\nPublic Function HASH_SHA256(str As String) As String\r\n    Dim sha256m As Object\r\n    Dim utf8 As Object\r\n    Dim bytes() As Byte\r\n    Dim hash() As Byte\r\n    Dim i As Integer\r\n    Dim res As String\r\n\r\n    Set utf8 = CreateObject(\"System.Text.UTF8Encoding\")\r\n    bytes = utf8.GetBytes_4(str)\r\n\r\n    Set sha256m = CreateObject(\"System.Security.Cryptography.SHA256Managed\")\r\n    hash = sha256m.ComputeHash_2((bytes))\r\n\r\n    For i = LBound(hash) To UBound(hash)\r\n        res = res & LCase(Right(\"0\" & Hex(hash(i)), 2))\r\n    Next i\r\n\r\n    HASH_SHA256 = LCase(res)\r\nEnd Function\r\n\r\n\r\nPublic Function HASH_SHA1(str As String) As String\r\n    Dim sha1m As Object\r\n    Dim utf8 As Object\r\n    Dim bytes() As Byte\r\n    Dim hash() As Byte\r\n    Dim i As Integer\r\n    Dim res As String\r\n\r\n    Set utf8 = CreateObject(\"System.Text.UTF8Encoding\")\r\n    bytes = utf8.GetBytes_4(str)\r\n\r\n    Set sha1m = CreateObject(\"System.Security.Cryptography.SHA1Managed\")\r\n    hash = sha1m.ComputeHash_2((bytes))\r\n\r\n    For i = LBound(hash) To UBound(hash)\r\n        res = res & LCase(Right(\"0\" & Hex(hash(i)), 2))\r\n    Next i\r\n\r\n    HASH_SHA1 = LCase(res)\r\nEnd Function\r\n\r\n\r\n\r\n==================================================\r\n\r\n'\r\n'\r\n<\/pre>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cf\u30b3\u30de\u30f3\u30c9\u3082API\u3082.NetFramework3.5\u3082\u3001\u300c\u3069\u308c\u3082\u4f7f\u308f\u306a\u3044\u300d\u5834\u5408\u306e\u3001DOS\u30b3\u30de\u30f3\u30c9\u3067\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u30cf\u30c3\u30b7\u30e5\u3092\u30b2\u30c3\u30c8\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n<p>\u3053\u308c\u306f\u3001\u30b3\u30de\u30f3\u30c9\u3082API\u3082.NetFramework3.5\u3082\u3001\u300c\u3069\u308c\u3082\u4f7f\u308f\u306a\u3044\u300d\u5834\u5408\u306e\u3082\u306e\u3067\u3059\u3002<br \/>\n\u7279\u306bWindows2000SP4Pro\u306a\u3069\u3067\u3069\u3046\u3057\u3066\u3082\uff13\u3064\u306e\u65b9\u6cd5\u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u3001<br \/>\n\uff08\uff1d\u4f8b\u3048\u3070\u793e\u5185\u898f\u7d04\u306b\u3088\u3063\u3066\u3068\u304b\u3001Windows2000SP4Pro\u81ea\u4f53\u3082\u7121\u3044Win1000\u7121\u5370\u3001\u3068\u304b\u3001<br \/>\n\u3000XP\u3067\u3042\u3063\u3066\u3082\u3001\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u5165\u624b\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u3068\u304b\u3002\uff09<br \/>\n\u306b\u4f7f\u3046\u6a5f\u4f1a\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\nSub HashCalcTest01()\r\n\r\n    Dim s_SrcFoldPath As String\r\n    Dim s_SrcFileNm As String\r\n    Dim s_Cmd01 As String\r\n    Dim s_ResultTxtFullPath As String\r\n       \r\n    \r\n    Let s_SrcFoldPath = \"D:\\1\\\"\r\n    Let s_SrcFileNm = \"rktools.exe\"\r\n'    Let s_SrcFileNm = \"aaa.txt\"\r\n    '\u2191\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u306e\u8a2d\u5b9a\r\n\r\n\r\n    'Print GetFileHashSha1(\"D:\\1\\rktools.exe\")\r\n    '3F3878FFB2C642E752D811DC05169BFCC2AA97B5\r\n    '\r\n    'Print GetFileHashSha1(\"D:\\1\\aaa.txt\")\r\n    '7E240DE74FB1ED08FA08D38063F6A6A91462A815\r\n\r\n\r\n    Let s_ResultTxtFullPath = \"D:\\1\\res.txt\"\r\n    '\u2191\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u7d50\u679c\u3092\u66f8\u304d\u8fbc\u3080\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30eb\u30d1\u30b9\r\n    ' \u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u5185\u5bb9\u306f\u4e0a\u66f8\u304d\u3055\u308c\u308b\u3002\r\n    \r\n    \r\n'    s_Cmd01 = \"cmd \/C DEL \"\"\" & s_FoldPath & \"\\222.txt\"\" > D:\\1\\res.txt \/s\"\r\n'    s_Cmd01 = \"cmd \/C dir \"\"\" & s_FoldPath & \"\"\" > D:\\1\\res.txt \/s\"\r\n    \r\n    Let s_Cmd01 = \"cmd \/C certutil -hashfile \"\"\" & s_SrcFoldPath & s_SrcFileNm & \"\"\" > \" & s_ResultTxtFullPath\r\n    '\u2191\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u306e\u30b3\u30de\u30f3\u30c9\u306e\u751f\u6210\r\n    \r\n    Call Shell(s_Cmd01, 2)\r\n    '\u2191\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u306e\u5b9f\u884c\r\n\r\n\r\n    Application.Wait (Now + TimeValue(\"0:00:2\"))\r\n    '\u2191\u6570\u79d2\u5f85\u305f\u306a\u3044\u3068\u3001\u7d50\u679c\u306e\u4e0a\u66f8\u304d\u304c\u8ffd\u3044\u4ed8\u304b\u306a\u3044\u306e\u3067\u3001\u5f85\u3064\u3002\r\n\r\n    '\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u62ec\u8aad\u307f\u8fbc\u307f\u3059\u308b\r\n    'https:\/\/vbanobuhinko.com\/%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E4%B8%80%E6%8B%AC%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E3%81%99%E3%82%8B\/\r\n    Dim bhFSO As Object, bhFSOT As Object\r\n    Set bhFSO = CreateObject(\"Scripting.FileSystemObject\")\r\n    '\u6307\u5b9a\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\r\n    Set bhFSOT = bhFSO.OpenTextFile(s_ResultTxtFullPath)\r\n    \r\n    '\u958b\u3044\u305f\u30c6\u30ad\u30b9\u30c8\u30921\u3064\u306e\u30c7\u30fc\u30bf\u306b\u4e00\u62ec\u8aad\u307f\u8fbc\u307f\r\n    Dim bhTxt As String\r\n    bhTxt = bhFSOT.ReadAll\r\n        \r\n    Debug.Print bhTxt\r\n    \r\n    'FSO\u306e\u89e3\u653e\r\n    Set bhFSOT = Nothing\r\n    Set bhFSO = Nothing\r\n\r\n\r\nEnd Sub\r\n\r\n\r\n\r\n'\r\n'\r\n<\/pre>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cfXP\u7528\u306e\u3001\u30b3\u30de\u30f3\u30c9\u3067SHA1\u30cf\u30c3\u30b7\u30e5\u3092\u30b2\u30c3\u30c8\u3059\u308b\u30b3\u30fc\u30c9<br \/>\n\uff08\u203b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u5272\u308a\u51fa\u3057\u306e\u5b9f\u884c\u7d50\u679c\u3092VBA\u5074\u306b\u53d7\u3051\u53d6\u308b\u65b9\u5f0f\uff09<br \/>\n\uff08\u203b\u53d7\u3051\u53d6\u308a\u5148\u304c\u300c\u914d\u5217\u300d\u3067\u306f\u306a\u304f\u3001\u666e\u901a\u306e\u5909\u6570\u306e\u65b9\u6cd5\uff09<\/p>\n<p>\uff08\u203b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3042\u3068\u3001\u305d\u306e\u7d50\u679c\u306e\u300c\u6570\u884c\u300d\u304b\u3089\u30cf\u30c3\u30b7\u30e5\u5024\u3060\u3051\u3092\u62bd\u51fa<br \/>\n\u3000\u3000\u3059\u308b\u30b3\u30fc\u30c9\u3082\u4e00\u7dd2\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002SHA256\u4ee5\u4e0a\u3082\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\uff09<br \/>\n\uff08\u203b\u4e00\u756a\u4e0a\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u7d50\u679c\u3092\u914d\u5217\u3067\u306f\u53d7\u3051\u53d6\u308a\u307e\u305b\u3093\u3002<br \/>\n\u3000\u3000\u7d50\u679c\u306e\u4e2d\u8eab\u3092\u30eb\u30fc\u30d7\u3057\u3066\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u90e8\u5206\u3092\u63a2\u3057\u3001\u305d\u308c\u3060\u3051\u3092<br \/>\n\u3000\u3000\u629c\u304d\u51fa\u3057\u3066\u3044\u307e\u3059\u3002\u591a\u5206\u3001\u4e00\u756a\u7c21\u5358\u306a\u65b9\u6cd5\u3067\u3059\u3002\uff09<\/p>\n<p>\u305f\u3060\u3001XP\u3067\u306f\u3001\u901a\u5e38\u306f\u3059\u3050\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002<br \/>\n\u3057\u304b\u3057\u3001<br \/>\n\u300cWindows Server 2003 Service Pack 2 \u7ba1\u7406\u30c4\u30fc\u30eb \u30d1\u30c3\u30af (x86 \u30a8\u30c7\u30a3\u30b7\u30e7\u30f3\u7528)\u300d<br \/>\n<a href=\"https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=6315\" target=\"_blank\" rel=\"noopener\">https:\/\/www.microsoft.com\/ja-jp\/download\/details.aspx?id=6315<\/a><br \/>\n\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001<br \/>\n\u52d5\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u305d\u306e\u969b\u3001\u3059\u3079\u3066\u306ePC\u306b\u305d\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304f\u3066\u3082OK\u3067\u3059\u3002<br \/>\n\u3069\u308c\u304b\uff11\u3064\u306ePC\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5b8c\u4e86\u5f8c\u306b\u3001\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092<br \/>\n\uff12\u3064\u629c\u304d\u51fa\u3057\u3066\u3001\u4ed6\u306e\u30de\u30b7\u30f3\u306b\u306f\u3001\u305d\u308c\u3092\u30b3\u30d4\u30da\u3059\u308c\u3070OK\u3067\u3059\u3002<br \/>\n\uff08\u300cc:\\windows\\system32\u300d\u306b\u3002\uff09<\/p>\n<p>\u305d\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001<br \/>\n\u300cc:\\windows\\system32\u300d\u306e\u3001\u300ccertutil.exe\u300d\u3068\u300ccertadm.dll\u300d\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u81ea\u4f53\u306fDOS\u7a93\u304c\u3061\u3089\u3064\u3044\u3066\u3057\u307e\u3044\u307e\u3059\u304c\u3001\u30cf\u30c3\u30b7\u30e5\u3092\u53d6\u5f97\u3059\u308b\u90e8\u5206\u3092\u6d88\u3059\u304b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3001\uff11\u3064\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u304b\u3051\u3042\u308f\u305b\u308b\u3068\u3001DOS\u7a93\u304c\u3061\u3089\u3064\u304b\u306a\u3044\u3088\u3046\u306b\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002\uff08\u305d\u306e\u5834\u5408\u306f\u3001\u6700\u4f4e\u3001Wait\u3067\uff12\u79d2\u307b\u3069\u5f85\u305f\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u304c\uff09<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\nPublic Function GetFileHashSha1(s_FilePath As String) As String\r\n\r\n    Dim o_WSH As Object\r\n    Dim o_wshExec As Object\r\n    Dim s_Cmd As String\r\n    Dim s_Output As String\r\n    Dim s_OutptStr01 As String\r\n    Dim s_OutptStr02 As String\r\n    \r\n    Dim i_vbcrlfPosi01 As Integer\r\n    Dim i_Cnt01 As Integer\r\n    Dim i_RightLen As Integer\r\n    \r\n    \r\n    If Dir(s_FilePath) <> \"\" Then\r\n        '\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u3063\u3061\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\r\n'        Debug.Print s_FilePath & \"\u306f\u5b58\u5728\u3057\u307e\u3059\u3002\"\r\n    Else\r\n        '\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u3001\u3053\u3063\u3061\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\r\n'        Debug.Print s_FilePath & \"\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\"\r\n        Let GetFileHashSha1 = \"\u30d5\u30a1\u30a4\u30eb\u7121\u3057\"\r\n        Exit Function\r\n    End If\r\n    Call Shell(\"certutil -hashfile \"\"d:\\1\\rktools.exe\"\" > d:\\1\\hash01.txt\"\"\", 1)\r\n\r\n    \r\n    Set o_WSH = CreateObject(\"WScript.Shell\")\r\n    s_Cmd = \"certutil -hashfile \" & _\r\n            \"\"\"\" & s_FilePath & \"\"\"\"\r\n    \r\n    \r\n    Set o_wshExec = o_WSH.Exec(\"%ComSpec% \/c \" & s_Cmd)\r\n    '\u2191\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\uff08\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u306e\u958b\u59cb\uff09\r\n\r\n    Do While o_wshExec.Status = 0\r\n        DoEvents\r\n    Loop\r\n    '\u8a08\u7b97\u304c\u7d42\u308f\u308b\u307e\u3067\u5f85\u3064\u3002\r\n\r\n    s_Output = o_wshExec.stdOut.ReadAll\r\n'    Stop\r\n    '\u2191\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u7d50\u679c\uff08XP\u3084Win2000\u306e\u5834\u5408\u306f3\u884c\u3002Win10\u306a\u3069\u306e\u5834\u5408\u306f4\u884c\uff09\u3092\u3001\r\n    '  \u5909\u6570\u306b\u5168\u884c\u5206\u3092\u53d7\u3051\u53d6\u308b\u3002\r\n    \r\n\r\n    i_vbcrlfPosi01 = 0\r\n'    Stop\r\n    For i_Cnt01 = 1 To 2\r\n        i_vbcrlfPosi01 = InStr(i_vbcrlfPosi01 + 1, s_Output, vbCrLf, vbBinaryCompare)\r\n    Next i_Cnt01\r\n    '\u2191\u53d7\u3051\u53d6\u3063\u305f\u7d50\u679c\u3092\u30eb\u30fc\u30d7\u3057\u3066\u3001\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u30b2\u30c3\u30c8\u3059\u308b\u3002\r\n    ' XP\u3084Win2000SP4Pro\u306e\u5834\u5408\u306f\u3001\u7d50\u679c\u304c\u300c\uff13\u884c\u300d\u306a\u306e\u3067\u3001\r\n    ' \u30eb\u30fc\u30d7\u306f\u300c 1 To 2\u300d\u3067OK\u3002\r\n'    Stop\r\n    \r\n    Let i_RightLen = Len(s_Output) - i_vbcrlfPosi01\r\n\r\n    Let s_OutptStr01 = Right(s_Output, i_RightLen)\r\n\r\n    Let i_vbcrlfPosi01 = 0\r\n    Let i_vbcrlfPosi01 = InStr(1, s_OutptStr01, vbCrLf, vbBinaryCompare)\r\n    \r\n    Let s_OutptStr02 = Left(s_OutptStr01, i_vbcrlfPosi01)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, \" \", \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbLf, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbCr, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbCrLf, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = UCase(s_OutptStr02)\r\n\r\n'    Debug.Print Len(s_OutptStr02)\r\n    GetFileHashSha1 = s_OutptStr02\r\n    \r\n    Set o_wshExec = Nothing\r\n    Set o_WSH = Nothing\r\n\r\n\r\nEnd Function\r\n\r\n'\r\n'\r\n<\/pre>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n<p>\u25cfWindows2000\uff08SP4\uff1fPro\u7248\uff09\u3067\u306e\u30b3\u30de\u30f3\u30c9\u5229\u7528\u3067\u306e\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u3002\uff08Certutil.exe\u5229\u7528\uff09<br \/>\n\uff08\u203b\u300c\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u5272\u308a\u51fa\u3057\u306e\u5b9f\u884c\u7d50\u679c\u3092VBA\u5074\u306b\u53d7\u3051\u53d6\u308b\u65b9\u5f0f\u300d\uff09<\/p>\n<p>WindowsXP\u306fCertutil.exe\u304c\u7121\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001Windows2000SP4Pro\u3084Server\u306b\u306f\u3001<br \/>\n\u3042\u3089\u304b\u3058\u3081\u3001Certutil.exe\u304c\u5165\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\u305f\u3060\u3001\u683c\u7d0d\u5834\u6240\u304c\u300cC:\\WINNT\\system32\\dllcache\u300d\u3067PATH\u304c\u901a\u3063\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u306a\u306e\u3067\u3001\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e\u300cPATH_Add01()\u300d\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306b\u3066\u3001<br \/>\n\u300cC:\\WINNT\\system32\\dllcache\u300d\u306b\u30d1\u30b9\u3092\u901a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u307e\u3042\u305d\u3053\u306f\u624b\u4f5c\u696d\u3067\u3082\u3082\u3061\u308d\u3093OK\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001PC\u518d\u8d77\u52d5\u3002<\/p>\n<p>\u57fa\u672c\u3001<br \/>\n\u2460\u300cPATH_Add01()\u300d\u95a2\u6570\u306a\u3069\u3067PATH\u3092\u901a\u3057\u3066PC\u3092\u518d\u8d77\u52d5\u3057\u3001<br \/>\n\u2461\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u300ccertutil \/?\u300d\u304c\u6b63\u5e38\u306b\u30d8\u30eb\u30d7\u8868\u793a\u3055\u308c\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u300ccert\u30fb\u30fb\u30fb\u300d\u95a2\u9023\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u3046\u3061\u3001<br \/>\nC:\\WINNT\\system32\\\u3068<br \/>\nC:\\WINNT\\system32\\dllcache\u306e\u4e21\u65b9\u306b\u5b58\u5728\u3057\u3066\u3001<br \/>\n\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u753b\u9762\u306e\u30c6\u30b9\u30c8\u3067\u3001\u300c\u5e8f\u6570\u304c\u30fb\u30fb\u30fb\u300d\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3068\u304d\u306f\u3001<br \/>\nC:\\WINNT\\system32\\dllcache\u306bPATH\u3092\u901a\u3057\u305f\u3042\u3068\u306f\u3001<br \/>\nC:\\WINNT\\system32\\\u5074\u306e\u540c\u540d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u3068\u3001<br \/>\n\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u304b\u306f\u3001\u51fa\u3066\u304d\u305f\u30a8\u30e9\u30fc\u306b\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u51fa\u308b\u306e\u3067\u3001<br \/>\n\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3059\u308c\u3070OK\u3067\u3059\u3002<br \/>\n\uff08\u5fc5\u305a\u3057\u3082\u5e38\u306b\uff11\uff10\uff10\uff05\u3046\u307e\u304f\u3044\u304f\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u304c\u3001\u4eca\u306e\u3068\u3053\u308d\u3001\u3046\u307e\u304f\u3044\u3063\u3066\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true \">\r\n'\r\n'\r\nSub PATH_Add01()\r\n\r\n    Dim wshShell As Object       ' \u5909\u6570\u5ba3\u8a00\r\n    Dim wshUserEnv  As Object\r\n     \r\n    Set wshShell = CreateObject(\"WScript.Shell\")\r\n    ' \u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u5909\u6570\u306e\u53d6\u5f97\uff08\u30b7\u30b9\u30c6\u30e0\u74b0\u5883\u5909\u6570\u306e\u5834\u5408\u306f System\uff09\r\n    Set wshUserEnv = wshShell.Environment(\"System\")\r\n    'PATH\u306f\u300c\"System\"\u300d\u3067\u3088\u3055\u305d\u3046\u3002\r\n    'https:\/\/vbabeginner.net\/add-and-edit-environment-variables\/\u3000\u53c2\u7167\r\n     \r\n    ' \u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u5909\u6570 TESTUSERENV \u3092\u8a2d\u5b9a\u3059\u308b\r\n    wshUserEnv.Item(\"PATH\") = Environ(\"PATH\") & \"C:\\WINNT\\system32\\dllcache;\"\r\n     \r\n    ' \u74b0\u5883\u5909\u6570\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\n    'wshUserEnv.Remove (\"PATH\")\r\n     \r\n    Set wshUserEnv = Nothing\r\n    Set wshShell = Nothing\r\nEnd Sub\r\n\r\n'\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u300cC:\\WINNT\\system32\\dllcache\u300d\u306b\u30d1\u30b9\u3092\u901a\u3057\u3066\u3001PC\u518d\u8d77\u52d5\u3002\r\n\r\n'\u306a\u304a\u3001\u300ccert\u30fb\u30fb\u30fb\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3001\r\n'C:\\WINNT\\system32\\\u3068\r\n'C:\\WINNT\\system32\\dllcache\u306e\u4e21\u65b9\u306b\u5b58\u5728\u3057\u3066\u3001\r\n'\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u753b\u9762\u306e\u30c6\u30b9\u30c8\u3067\u3001\u300c\u5e8f\u6570\u304c\u30fb\u30fb\u30fb\u300d\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3068\u304d\u306f\u3001\r\n'C:\\WINNT\\system32\\dllcache\u306bPATH\u3092\u901a\u3057\u305f\u3042\u3068\u306f\u3001\r\n'C:\\WINNT\\system32\\\u5074\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\r\n\r\n\r\n\r\n'=====================================\r\n\r\nPublic Function GetFileHashSha1ForWin2000(s_FilePath As String) As String\r\n \r\n'\u4e8b\u524d\u306b\u3001\r\n'\u2460\u300cPATH_Add01()\u300d\u95a2\u6570\u306a\u3069\u3067PATH\u3092\u901a\u3057\u3066PC\u3092\u518d\u8d77\u52d5\u3057\u3001\r\n'\u2461\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u300ccertutil \/?\u300d\u304c\u6b63\u5e38\u306b\u30d8\u30eb\u30d7\u8868\u793a\u3055\u308c\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\u304c\u5fc5\u8981\u3067\u3059\u3002\r\n\r\n    Dim o_WSH As Object\r\n    Dim o_wshExec As Object\r\n    Dim s_Cmd As String\r\n    Dim s_Output As String\r\n    Dim s_OutptStr01 As String\r\n    Dim s_OutptStr02 As String\r\n    \r\n    Dim i_vbcrlfPosi01 As Integer\r\n    Dim i_Cnt01 As Integer\r\n    Dim i_RightLen As Integer\r\n    \r\n    \r\n    If Dir(s_FilePath) <> \"\" Then\r\n        '\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u3063\u3061\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\r\n'        Debug.Print s_FilePath & \"\u306f\u5b58\u5728\u3057\u307e\u3059\u3002\"\r\n    Else\r\n        '\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u3001\u3053\u3063\u3061\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\r\n'        Debug.Print s_FilePath & \"\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\"\r\n        Let GetFileHashSha1 = \"\u30d5\u30a1\u30a4\u30eb\u7121\u3057\"\r\n        Exit Function\r\n    End If\r\n    Call Shell(\"certutil -hashfile \"\"d:\\1\\rktools.exe\"\" > d:\\1\\hash01.txt\"\"\", 1)\r\n \r\n    \r\n    Set o_WSH = CreateObject(\"WScript.Shell\")\r\n    Let s_Cmd = \"certutil -hashfile \" & _\r\n                  \"\"\"\" & s_FilePath & \"\"\"\"\r\n    \r\n    \r\n    Set o_wshExec = o_WSH.Exec(\"%ComSpec% \/c \" & s_Cmd)\r\n \r\n    Do While o_wshExec.Status = 0\r\n        DoEvents\r\n    Loop\r\n \r\n    Let s_Output = o_wshExec.stdOut.ReadAll\r\n'    Stop\r\n    \r\n \r\n \r\n'    Let i_vbcrlfPosi01 = 0\r\n'    Stop\r\n'    For i_Cnt01 = 1 To 1\r\n        Let i_vbcrlfPosi01 = InStr(i_vbcrlfPosi01 + 1, s_Output, vbCrLf, vbBinaryCompare)\r\n'    Next i_Cnt01\r\n     '\u2191XP\u306e\u5834\u5408\u306f\uff14\u884c\u3042\u308b\u306e\u3067\uff12\u56de\u30eb\u30fc\u30d7\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3051\u3069\u3001\r\n     '\u3000Win2000\u306e\u5834\u5408\u306f\uff13\u884c\u3057\u304b\u306a\u3044\u306e\u3067\u30eb\u30fc\u30d7\u306e\u5fc5\u8981\u304c\u306a\u3044\u3002\r\n     '\u3000\u307e\u305f\u3001\u300cXP\u30682000\u306e\u4e21\u65b9\u3067\u5171\u901a\u300d\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306a\u3089\u3001\r\n     '\u3000\u5f8c\u308d\u304b\u3089\u3084\u3063\u305f\u307b\u3046\u304c\u3001\u5f8c\u308d\u304b\u3089\uff12\u884c\u76ee\u304c\u30cf\u30c3\u30b7\u30e5\u5024\u306a\u306e\u3067\u3001\r\n     '\u3000\u305d\u306e\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3002\r\n    \r\n'    Stop\r\n    \r\n    Let i_RightLen = Len(s_Output) - i_vbcrlfPosi01\r\n \r\n    Let s_OutptStr01 = Right(s_Output, i_RightLen)\r\n \r\n    Let i_vbcrlfPosi01 = 0\r\n    Let i_vbcrlfPosi01 = InStr(1, s_OutptStr01, vbCrLf, vbBinaryCompare)\r\n    \r\n    Let s_OutptStr02 = Left(s_OutptStr01, i_vbcrlfPosi01)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, \" \", \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbLf, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbCr, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = Replace(s_OutptStr02, vbCrLf, \"\", , , vbBinaryCompare)\r\n    Let s_OutptStr02 = UCase(s_OutptStr02)\r\n \r\n'    Debug.Print Len(s_OutptStr02)\r\n    Let GetFileHashSha1 = s_OutptStr02\r\n    \r\n    Set o_wshExec = Nothing\r\n    Set o_WSH = Nothing\r\n \r\n \r\nEnd Function\r\n\r\n\r\n'\r\n'\r\n<\/pre>\n<p><SPAN>\u3000\u3000<\/SPAN><br \/>\n<SPAN>\u3000\u3000<\/SPAN><\/p>\n<p><SPAN>\u3000\u3000<\/SPAN><\/p>\n","protected":false},"excerpt":{"rendered":"\u2605ExcelVBA \uff5e \u3010\u96fb\u5b50\u5e33\u7c3f\u4fdd\u5b58\u6cd5\u30fb\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u3089\u307f\u3011\u30d5\u30a1\u30a4\u30eb\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u30b2\u30c3\u30c8\u3059\u308b\u95a2\u6570 \u203b\u307e\u3060\u66f8\u304d\u304b\u3051\u3067\u3059\u3002\u3059\u307f\u307e\u305b\u3093\u3002 \u203b\u9593\u9055\u3063\u3066\u305f\u3089\u3059\u307f\u307e\u305b\u3093\u3002 \u203b\u30e1\u30e2\u66f8\u304d\u306a\u306e\u3067\u3001\u81ea\u5206\u3067\u3082\u610f\u5473\u4e0d\u660e\u306a\u7b87\u6240\u3082\u591a\u3044\u3067\u3059\u3002\u3054\u3081 ...","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[234],"_links":{"self":[{"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/posts\/1909"}],"collection":[{"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/comments?post=1909"}],"version-history":[{"count":0,"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/posts\/1909\/revisions"}],"wp:attachment":[{"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/media?parent=1909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/euc-access-excel-db.com\/tips\/wp-json\/wp\/v2\/categories?post=1909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}