public bool Verify() { if (Signer != null) { Signer = new ReplaySignature(Header.Certificate.Data); bool b = Signer.Verify(Reader.Hasher.ComputeHash(), Header.Signature.Data, Signer.MixedCert); return(b); } else { return(false); } }
public GhostReplay(string file, string gameversion, bool usecache, string tempdir, byte[] cert, string pass) { PlayerInfos = new BasicInfo(); Header = new ReplayHeader(); UseCache = usecache; CacheDirectory = tempdir + @"\" + Path.GetFileNameWithoutExtension(file); GameVersion = gameversion; Signer = new ReplaySignature(cert, pass); Keys = new List <GameData>(); Chunks = new List <GameData>(); FileName = file; if (UseCache) { if (!Directory.Exists(CacheDirectory)) { Directory.CreateDirectory(CacheDirectory); } RestoreFromCache(); } }