GIFThis is a page for GIF file analysis. Upload a GIF file (or try a sample file): Try an exampleWhat are we looking for?For a GIF file, we look for the byte sequence 474946 or the ASCII sequence of GIF. The following is an outline of GIF files here |
File contents analysisType: Version: oct (6F,63,74) Color tableColor 0: Red: 108 Green: 62 Blue: 10 File signature analysis (Header analysis)Additional scanning signature analysisFile hex characters[00000000] 3C 21 64 6F 63 74 79 70 65 20 68 74 6D 6C 3E 0A <!doctype.html>. Base-64 conversionPCFkb2N0eXBlIGh0bWw+CjxodG1sIGRhdGEtYWRibG9ja2tleT0iTUZ3d0RRWUpLb1pJaHZj Presentation |
Sample code
[HttpPost] public ActionResult shamir(FormCollection form) { string shares = ""; int nshares = 2; int nthreshold = 2; List<String> results = new List<String>(); string secret = (string)form["message"]; string sh = (string)form["nshares"]; string th = (string)form["nthreshold"]; SSharp shamir = new SSharp(); try { nshares = Convert.ToInt32(sh); nthreshold = Convert.ToInt32(th); results = shamir.CreateShares((int)nthreshold, (int)nshares, secret); foreach (String s in results) { shares += s + Environment.NewLine; } } catch { } ViewData["shares"] = shares; // Reconstruct using the first few from threshold List<string> res = new List<string>(); for (int i = 0; i < nthreshold; i++) res.Add(results[i]); shamir = new SSharp(); String result = shamir.RebuildSecret((int)nthreshold, res); string reconstructed = result; ViewData["recon"] = reconstructed; return PartialView("shamir_partial"); }