Beispiel #1
0
 public static bool IsRar5File(Stream stream, ReaderOptions options = null)
 {
     try
     {
         var signatureFactory = new Rar5SignatureFactory();
         var signature        = signatureFactory.ReadSignature(stream);
         return(signature != null && signature.IsValid());
     }
     catch
     {
         return(false);
     }
 }
        public void ReadSignature_CorrectFile()
        {
            var signature = signatureFactory.ReadSignature(GetReaderStream("Rar5.rar"));

            Assert.True(signature.IsValid());
        }