個人檔案

加入日期: 2022年5月18日

關於



 

X509 Serial Number Hexadecimal 32


Download


 





However, I have two problems: Serial number is displayed as 32 char hexadecimal string The resulting numbers are a lot of 0's, such as ‘00 . I have tried to set the formatter with various . but this still did not solve it. I tried to use all the different options as you can see from the code below. byte[] rr = null; Org.BouncyCastle.X509.X509Store x509Store = new Org.BouncyCastle.X509.X509Store(); x509Store.Open(OpenFlags.ReadWrite); Org.BouncyCastle.X509.Store.Item item = x509Store.GetCertificate(x509CertificateName); if (item!= null) { rr = new byte[(int)item.GetLength(0)]; x509Store.GetCertificate(x509CertificateName).Export(item, rr, Org.BouncyCastle.X509.X509ContentType.Cert); Org.BouncyCastle.X509.X509CertificateCollection collection = new Org.BouncyCastle.X509.X509CertificateCollection(rr); foreach (Org.BouncyCastle.X509.X509Certificate certificate in collection) { Console.WriteLine(certificate.GetSerialNumber().GetPosHex()); } } A: This code worked for me:




ee43de4aa9

X509 Serial Number Hexadecimal 32

更多動作