public static void FullHash() { string fullhashbrowns = "MD5: " + "b1a4b39364b0f9ddebec81e0119264fb".ToUpper() + "\n" +//augmented reference to check accurate hashes. "SHA1: " + "bbf9fd79e065139f1991db7f0fb37767c2dd30f1".ToUpper() + "\n" + "SHA512: " + "A6F32EB04A034D23F7756A6DAB7B185951906F3AADE5727EB0DEB46878A98B0B7CCD2F5774F6BD70D9FC3FCB1858768F3492B6D8691F4AF29D1C7F6EB4A88985" + "\n" + "SHA384: " + "3649808DD45FBDE42EF469054F32303841D7E938B9BA6F253260EA039537CE262711A73C5CC74F65DC656F2A21F451E3" + "\n" + "SHA256: " + "76a68ddfd6043b8ac45962ccb92e0bcc7421004f21f3b613a364735fce5bcd09".ToUpper() + "\n" + "SSDEEP: " + "384:dXOa+qC78kbdvxvga7C5wgbzDdlHAuZLz:Ih8kB9gKC5FthAGz"; string lasttestedhash = "MD5: B1A4B39364B0F9DDEBEC81E0119264FB\n" + //copied output from last execution 6/23/2020 21:41 "SHA1: BBF9FD79E065139F1991DB7F0FB37767C2DD30F1\n" + "SHA512: A6F32EB04A034D23F7756A6DAB7B185951906F3AADE5727EB0DEB46878A98B0B7CCD2F5774F6BD70D9FC3FCB1858768F3492B6D8691F4AF29D1C7F6EB4A88985\n" + "SHA384: 3649808DD45FBDE42EF469054F32303841D7E938B9BA6F253260EA039537CE262711A73C5CC74F65DC656F2A21F451E3\n" + "SHA256: 76A68DDFD6043B8AC45962CCB92E0BCC7421004F21F3B613A364735FCE5BCD09\n" + "SSDEEP: 384:dXOa+qC78kbdvxvga7C5wgbzDdlHAuZLz:Ih8kB9gKC5FthAGz"; string filename = @"..\..\..\..\ProjectTestFiles\Quiz-week06.docx"; FAFileInfo.DisplayHashes(filename); Assert.AreEqual(fullhashbrowns, lasttestedhash); }
public static void ExploreFileFormat(string directory, string type) { Console.WriteLine($"========================{type}========================="); FAFileInfo.DirectoryOutlook(directory); }
public static void TestPrintFileHeaders(string filename) { FAFileInfo.PrintFileHeaderBytes(filename, 64); }