Re: Integrirt test at startup
- From: Dominick Baier [DevelopMentor] <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 14:15:46 -0800
Hi,
the corresponding keyed hash class is called HMACSHA256.
--------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com
I am almost there but one question remains: I want to use a key (that I store in the registry or db or file) to compute my hash but the func below does not allow it? Thanks for the great info! "Dominick Baier [DevelopMentor]" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4580be6318099c8c7d9fcbea87135@xxxxxxxxxxxxxxxxxxxxx
byte[] hashFile(string fileName) { using (FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) { return new SHA256Managed().ComputeHash(file); } } --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.comThat is true (I will put in registry or a file) -- but I do not know how to compute a hash on an .exe -- do you have sample or info on that -- would be greatly appretiated! Thanks "Dominick Baier [DevelopMentor]" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4580be6317eac68c7d92562bcb5e6@xxxxxxxxxxxxxxxxxxxxxHi, i would store the "known hash" in a separate location - another file or in a db Look at System.Security.Cryptography.KeyedHash --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.comWe need to do an integrity test at startup for our application (take .exe and compute signature and check against the know signature). Does anyone have info/sample on doing this? I assume we have to have a public key and somehow append that on the end of the application too?
Thank you!
.
- Follow-Ups:
- Re: Integrirt test at startup
- From: devgrt
- Re: Integrirt test at startup
- References:
- Re: Integrirt test at startup
- From: devgrt
- Re: Integrirt test at startup
- Prev by Date: Re: Integrirt test at startup
- Next by Date: Re: Integrirt test at startup
- Previous by thread: Re: Integrirt test at startup
- Next by thread: Re: Integrirt test at startup
- Index(es):
Relevant Pages
|