Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopyWithPrivateKey() [1/4]

ICertificatePal Internal.Cryptography.Pal.CertificatePal.CopyWithPrivateKey ( DSA dsa)
inline

Implements Internal.Cryptography.ICertificatePal.

Definition at line 652 of file CertificatePal.cs.

653 {
655 ICertificatePal certificatePal = null;
656 if (dSACng != null)
657 {
659 if (certificatePal != null)
660 {
661 return certificatePal;
662 }
663 }
665 {
667 if (certificatePal != null)
668 {
669 return certificatePal;
670 }
671 }
672 DSAParameters parameters = dsa.ExportParameters(includePrivateParameters: true);
673 using (PinAndClear.Track(parameters.X))
674 {
675 using DSACng dSACng2 = new DSACng();
676 dSACng2.ImportParameters(parameters);
677 return CopyWithEphemeralKey(dSACng2.Key);
678 }
679 }
ICertificatePal CopyWithEphemeralKey(CngKey cngKey)
unsafe ICertificatePal CopyWithPersistedCapiKey(CspKeyContainerInfo keyContainerInfo)
unsafe ICertificatePal CopyWithPersistedCngKey(CngKey cngKey)

References Internal.Cryptography.Pal.CertificatePal.CopyWithEphemeralKey(), Internal.Cryptography.Pal.CertificatePal.CopyWithPersistedCapiKey(), Internal.Cryptography.Pal.CertificatePal.CopyWithPersistedCngKey(), Internal.Cryptography.PinAndClear.Track(), and System.Security.Cryptography.DSAParameters.X.