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

◆ TryExportEncryptedPkcs8PrivateKey() [2/2]

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

Reimplemented from System.Security.Cryptography.ECDiffieHellman.

Definition at line 390 of file ECDiffieHellmanImplementation.cs.

391 {
392 if (pbeParameters == null)
393 {
394 throw new ArgumentNullException("pbeParameters");
395 }
396 PasswordBasedEncryption.ValidatePbeParameters(pbeParameters, password, ReadOnlySpan<byte>.Empty);
397 if (CngPkcs8.IsPlatformScheme(pbeParameters))
398 {
399 return TryExportEncryptedPkcs8(password, pbeParameters.IterationCount, destination, out bytesWritten);
400 }
401 return CngPkcs8.TryExportEncryptedPkcs8PrivateKey(this, password, pbeParameters, destination, out bytesWritten);
402 }
bool TryExportEncryptedPkcs8(ReadOnlySpan< char > pkcs8Password, int kdfCount, Span< byte > destination, out int bytesWritten)

References System.destination, System.Security.Cryptography.CngPkcs8.IsPlatformScheme(), System.Security.Cryptography.PbeParameters.IterationCount, System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.TryExportEncryptedPkcs8(), System.Security.Cryptography.CngPkcs8.TryExportEncryptedPkcs8PrivateKey(), and System.Security.Cryptography.PasswordBasedEncryption.ValidatePbeParameters().