Beispiel #1
0
 /// <summary>
 /// Use this cert to verify a hash
 /// </summary>
 /// <param name="Hash">The hash to verify</param>
 /// <param name="Provider">The provider to use</param>
 public bool VerifyHash(Hash Hash, HashProvider Provider)
 {
     using (var rsa = RSA.Create()) {
         rsa.ImportParameters(GetX509Certificate().GetRSAPublicKey().ExportParameters(false));
         return(rsa.VerifyData(Hash.Bytes, Hash.SignatureBytes, Provider.GetHashAlgorithmName(), RSASignaturePadding.Pkcs1));
     }
 }