Beispiel #1
0
 /// <summary>
 ///     Verify all files from an archive.
 /// </summary>
 /// <param name="path">Destination path for extracted files</param>
 /// <param name="fileName">Archive file pathname</param>
 /// <param name="rsa">RSA provider, with public key</param>
 /// <returns>Operation result</returns>
 /// <externalUnit/>
 /// <revision revisor="dev05" date="03/06/09" version="1.0.8.17">
 ///     Method created.
 /// </revision>
 /// <revision revisor="dev05" date="03/19/09" version="1.0.9.3">
 ///     Return an OperationResult.
 /// </revision>
 public static OperationResult VerifyAll(
     string path,
     string fileName,
     RSACryptoServiceProvider rsa)
 {
     return(SignedArchive.VerifyAll(
                path,
                fileName,
                rsa,
                true));
 }
Beispiel #2
0
 /// <summary>
 ///     Verify all files from an archive.
 /// </summary>
 /// <param name="path">Destination path for extracted files</param>
 /// <param name="fileName">Archive file pathname</param>
 /// <param name="rsa">RSA provider, with public key</param>
 /// <param name="shortKey">if set to <c>true</c> [short key].</param>
 /// <returns>Operation result</returns>
 /// <externalUnit/>
 /// <revision revisor="dev05" date="03/06/09" version="1.0.8.17">
 ///     Method created.
 /// </revision>
 /// <revision revisor="dev05" date="03/19/09" version="1.0.9.3">
 ///     Return an OperationResult.
 /// </revision>
 public static OperationResult VerifyAll(
     string path,
     string fileName,
     RSACryptoServiceProvider rsa,
     bool shortKey)
 {
     using (var sa = new SignedArchive(path, fileName, shortKey))
     {
         sa.OpenRead(rsa);
         return(sa.ExtractAllFiles(true));
     }
 }