GIF File
[Magic Home][Home]
This is a page for GIF file analysis. | |
Type: GIF (47,49,46) Color tableColor 0: Red: 44 Green: 43 Blue: 44 File signature analysis (Header analysis)GIF file (Starts with GIF)Additional scanning signature analysisPossible: [TIF files, sig: 4949] Count: 1 File hex characters[00000000] 47 49 46 38 39 61 F4 01 8F 00 F7 00 00 2C 2B 2C GIF89a.......,+, Base-64 conversionR0lGODlh9AGPAPcAACwrLN7e3tbW1mVmZWlpaaampuDh4CQcH8nKyRIMDoyMjMXFxdHR0Q4M 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"); }