简体   繁体   中英

How do I get certificate's key size

我有一个X.509证书,需要获得其密钥的大小(以位为单位) - 例如,1024 2048等。我已经查看了X509Certificate2以及bouncycastle X509Certificate类,但看不到如何获得密钥大小。

You surely have access to the public key. The key length is public key's size: this.PublicKey.Key.KeySize;
To see an implemented solution, check out this article on MSDN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM