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

◆ WritePkcs1PrivateKey()

unsafe AsnWriter System.Security.Cryptography.RSA.WritePkcs1PrivateKey ( )
inlineprivateinherited

Definition at line 450 of file RSA.cs.

451 {
452 RSAParameters rsaParameters = ExportParameters(includePrivateParameters: true);
453 fixed (byte* ptr6 = rsaParameters.D)
454 {
455 fixed (byte* ptr5 = rsaParameters.P)
456 {
457 fixed (byte* ptr4 = rsaParameters.Q)
458 {
459 fixed (byte* ptr3 = rsaParameters.DP)
460 {
461 fixed (byte* ptr2 = rsaParameters.DQ)
462 {
463 fixed (byte* ptr = rsaParameters.InverseQ)
464 {
465 try
466 {
467 return RSAKeyFormatHelper.WritePkcs1PrivateKey(in rsaParameters);
468 }
469 finally
470 {
471 ClearPrivateParameters(in rsaParameters);
472 }
473 }
474 }
475 }
476 }
477 }
478 }
479 }
static void ClearPrivateParameters(in RSAParameters rsaParameters)
Definition RSA.cs:662
RSAParameters ExportParameters(bool includePrivateParameters)

References System.Security.Cryptography.RSA.ClearPrivateParameters(), System.Security.Cryptography.RSAParameters.D, System.Security.Cryptography.RSAParameters.DP, System.Security.Cryptography.RSAParameters.DQ, System.Security.Cryptography.RSA.ExportParameters(), System.Security.Cryptography.RSAParameters.InverseQ, System.Security.Cryptography.RSAParameters.P, System.Security.Cryptography.RSAParameters.Q, and System.Security.Cryptography.RSAKeyFormatHelper.WritePkcs1PrivateKey().

Referenced by System.Security.Cryptography.RSA.ExportRSAPrivateKey(), and System.Security.Cryptography.RSA.TryExportRSAPrivateKey().