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

◆ TryExportEncryptedPkcs8PrivateKey() [1/2]

override bool System.Security.Cryptography.RSA.TryExportEncryptedPkcs8PrivateKey ( ReadOnlySpan< byte > passwordBytes,
PbeParameters pbeParameters,
Span< byte > destination,
out int bytesWritten )
inlinevirtualinherited

Reimplemented from System.Security.Cryptography.AsymmetricAlgorithm.

Reimplemented in System.Security.Cryptography.RSAImplementation.RSACng, and System.Security.Cryptography.RSACng.

Definition at line 432 of file RSA.cs.

433 {
434 if (pbeParameters == null)
435 {
436 throw new ArgumentNullException("pbeParameters");
437 }
438 PasswordBasedEncryption.ValidatePbeParameters(pbeParameters, ReadOnlySpan<char>.Empty, passwordBytes);
439 AsnWriter pkcs8Writer = WritePkcs8PrivateKey();
440 AsnWriter asnWriter = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8Writer, pbeParameters);
441 return asnWriter.TryEncode(destination, out bytesWritten);
442 }
bool TryEncode(Span< byte > destination, out int bytesWritten)
Definition AsnWriter.cs:173
unsafe AsnWriter WritePkcs8PrivateKey()
Definition RSA.cs:393

References System.destination, System.Formats.Asn1.AsnWriter.TryEncode(), System.Security.Cryptography.PasswordBasedEncryption.ValidatePbeParameters(), System.Security.Cryptography.KeyFormatHelper.WriteEncryptedPkcs8(), and System.Security.Cryptography.RSA.WritePkcs8PrivateKey().