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

◆ TryExportEncryptedPkcs8PrivateKey() [2/2]

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

Reimplemented from System.Security.Cryptography.AsymmetricAlgorithm.

Reimplemented in System.Security.Cryptography.DSAImplementation.DSACng, and System.Security.Cryptography.DSACng.

Definition at line 541 of file DSA.cs.

542 {
543 if (pbeParameters == null)
544 {
545 throw new ArgumentNullException("pbeParameters");
546 }
547 PasswordBasedEncryption.ValidatePbeParameters(pbeParameters, password, ReadOnlySpan<byte>.Empty);
548 AsnWriter pkcs8Writer = WritePkcs8();
549 AsnWriter asnWriter = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8Writer, pbeParameters);
550 return asnWriter.TryEncode(destination, out bytesWritten);
551 }
bool TryEncode(Span< byte > destination, out int bytesWritten)
Definition AsnWriter.cs:173
unsafe AsnWriter WritePkcs8()
Definition DSA.cs:565

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