中の技術日誌ブログ

C#とC++/CLIと
VBと.NETとWindowsで戯れる
 

目次

Blog 利用状況

ニュース

自己紹介

東京でソフトウェアエンジニアをやっています。
お仕事大募集中です。
記事執筆や、講師依頼とかでも何でもどうぞ(*^_^*)
似顔絵 MSMVPロゴ
MSMVP Visual C# Since 2004/04-2013/03

記事カテゴリ

書庫

日記カテゴリ

00-整理

01-MSMVP

指定ディレクトリ以下のファイルのハッシュ(MD5)を取る

ソースだけ書き残しておく

class Program
{
    static void Main(string[] args)
    {
        var pathname = args[0];

        var files = Directory.GetFiles(pathname, "*.*", SearchOption.AllDirectories);
        var md5 = MD5.Create();
        foreach (var file in files)
        {
            var bytes = File.ReadAllBytes(file);
            var x = md5.ComputeHash(bytes);
            Console.WriteLine(string.Format("{0}\t{1}", file, ByteToByteString(x)));
        }
    }

    static string ByteToByteString(byte[] data)
    {
        var sb = new StringBuilder();
        foreach ( var byt  in data)
        {
            var bytstr = "00" + byt.ToString("X");
            sb.Append(bytstr.Substring( bytstr.Length - 2));
        }
        return sb.ToString();
    }
}

投稿日時 : 2009年10月29日 14:54

コメントを追加

# personal essays for college applications f28ckg 2022/09/09 1:44 Charlosmox


With thanks, I like it! https://definitionessays.com/ essay editing services

# 99 thesis j69kbg 2023/03/02 23:42 Josephbried


Thanks a lot. Excellent information!
good thesis statements https://writingthesistops.com/ custom thesis service

# essay writing homework help p16ypp 2023/03/06 3:59 EugeneSib


Regards. Good stuff.
college application essay service https://helpwritingdissertation.com youtube essay writing https://buycheapessaysonline.com

# how to write five paragraph essay p61phw 2023/03/06 7:18 Gregorysaipt


Appreciate it! Ample postings!
thesis thesis https://bestpaperwritingservice.com research writing https://payforanessaysonline.com

# essay for college admission w70ncf 2023/03/07 5:58 Gregorysaipt


Valuable info. Kudos.
how to do a college essay https://buyanessayscheaponline.com how to write a persuasive essay introduction https://service-essay.com

# service essays t297jy 2023/03/07 10:02 EugeneSib


Really tons of beneficial data.
citing website in essay https://researchproposalforphd.com writing a rhetorical analysis essay https://essaywritinghelperonline.com

# personal college essay u983fj 2023/03/08 2:02 EugeneSib


Good information, With thanks!
case study writing services https://englishessayhelp.com easy steps to writing an essay https://homeworkcourseworkhelps.com

# thesis dissertation difference t62gne 2023/03/08 4:21 Gregorysaipt

You actually reported it perfectly!
demystifying dissertation writing https://writingpaperforme.com custom essay writing service https://hireawriterforanessay.com

# writing analytical essays m62ruz 2023/03/09 2:35 Gregorysaipt


Whoa a lot of helpful data!
dissertation writing service https://essaywritingserviceahrefs.com how to write a psychology essay https://essaywritingserviceahrefs.com

# writing scholarship essays z86hxg 2023/03/09 9:56 EugeneSib


Well expressed certainly! !
psychology dissertation topics https://essaywriting4you.com thesis page https://essaywritingserviceahrefs.com

# college essay idea m791iw 2023/03/10 14:56 EugeneSib


Regards. I like it!
how to write a grad school application essay https://service-essay.com custom essay meister review https://essaywritingservicetop.com

# phd diss x52llm 2023/03/10 21:32 Gregorysaipt


Nicely put. Appreciate it!
how to write a collage essay https://argumentativethesis.com how to write dialogue in an essay https://writinganessaycollegeservice.com

# what to write in college essay r123sa 2023/03/11 19:19 Gregorysaipt

You explained this really well.
how to write introduction for essay https://service-essay.com best custom essay website https://paperwritingservicecheap.com

# college scholarship essay help g40ovt 2023/03/12 11:40 EugeneSib


Regards! An abundance of postings.
dissertation publishing https://quality-essays.com college application essay help https://essaywriting4you.com

タイトル
名前
URL
コメント