title: How to verify a signature with a public key provided in .pem File?
body: <p>How can I verify a signature with a public key provided in .pem File?</p>
  
  <p>I use the flowing code:</p>
  
  <pre><code>RSACryptoServiceProvider CrRsa;
  
  var reader21 = File.OpenText(@"C:GTLpublicKey.pem");
  var x = new PemReader(reader21);
  var y = (RsaKeyParameters)x.ReadObject();
  
  CrRsa = (RSACryptoServiceProvider)RSACryptoServiceProvider.Create();
  RSAParameters pa = new RSAParameters();
  pa.Modulus = y.Modulus.ToByteArray();
  pa.Exponent = y.Exponent.ToByteArray();
  CrRsa.ImportParameters(pa);
  </code></pre>
  
  <p><code>y</code> returns <code>null</code>, results in an Error at <code>pa.Modulus = y.Modulus.ToByteArray();</code></p>