title: How to get RSA keyid/Fingerprint from RSA private Key using BouncyCastle C#
body: <p>I am using BouncyCastle to read the RSA Private key, I want to get the fingerprint or unique key id from the private key.</p>
  
  <p>below is the code </p>
  
  <pre><code>using (Stream stream = new MemoryStream(privateKey))
  {
      using (var reader = new StreamReader(stream))
      {
          RsaPrivateCrtKeyParameters rsaPrivatekey;
          if (!string.IsNullOrEmpty(passPhrase))
          {
              var privateKeyObject = new PemReader(reader, new PasswordFinder(passPhrase)).ReadObject();
              rsaPrivatekey = (RsaPrivateCrtKeyParameters) privateKeyObject;
          }
          else
          {
              var privateKeyObject = new PemReader(reader).ReadObject();
              rsaPrivatekey = (RsaPrivateCrtKeyParameters) privateKeyObject;
          }
         /*here I want to get the Key Id or Fingerprint using 
         rsaPrivatekey object*/
  
      }
  }
  </code></pre>