Beispiel #1
0
 /// <summary>
 /// Creates a hashable file, computes the hash and signature immediately
 /// </summary>
 public HashableFile(string FilePath, HashProvider Provider, Cert SigningCert)
 {
     _filePath = FilePath;
     this.ComputeHash(Provider, SigningCert);
 }
Beispiel #2
0
 public void ComputeHash(HashProvider Provider, Cert SigningCert)
 {
     ComputedHash = Hash.Compute(GetHashableStream(), Provider, SigningCert);
 }
Beispiel #3
0
        public bool Verify(Cert SigningPublicCert)
        {
            string n = null;

            return(ComputedHash.Verify(GetHashableStream(), out n, SigningPublicCert));
        }
Beispiel #4
0
 /// <summary>
 /// Verifies the hash and signature of an object
 /// </summary>
 /// <param name="SigningPublicCert"></param>
 /// <returns>Returns TRUE if the hash and signature verify correctly</returns>
 public bool Verify(Cert SigningPublicCert, out string Reason)
 {
     return(ComputedHash.Verify(GetHashableStream(), out Reason, SigningPublicCert));
 }
 /// <summary>
 /// Compute a hash for this object and optionally signs it
 /// </summary>
 /// <param name="Provider">The hash provider to use</param>
 /// <param name="SigningCert">If provided the cert to sign the hash with</param>
 public void ComputeHash(HashProvider Provider, Cert SigningCert = null)
 {
     ComputedHash = Hash.Compute(GetHashableData(), Provider, SigningCert);
 }