12345678910111213141516171819 |
-
- using PCC2.Security;
- namespace PCC2.Pocs;
- internal static class PocGenerateKeyAndCer
- {
- public static void RunPoc()
- {
- var k = RsaUtility.GenerateKey(1024);
- var rsa = RsaUtility.FromKey(k);
- var cer = RsaUtility.GenerateShortLivedCertificate(rsa);
- var rsaPub = Convert.ToHexString(rsa.ExportRSAPublicKey());
- var strPub = cer.GetPublicKeyString();
- var tp = cer.Thumbprint;
- var isMatched = rsaPub == strPub;
- }
- }
|