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

◆ TryExportEncryptedPkcs8PrivateKey() [2/2]

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

Reimplemented from System.Security.Cryptography.DSA.

Definition at line 216 of file DSACng.cs.

217 {
218 if (pbeParameters == null)
219 {
220 throw new ArgumentNullException("pbeParameters");
221 }
222 System.Security.Cryptography.PasswordBasedEncryption.ValidatePbeParameters(pbeParameters, password, ReadOnlySpan<byte>.Empty);
224 {
225 return TryExportEncryptedPkcs8(password, pbeParameters.IterationCount, destination, out bytesWritten);
226 }
227 return System.Security.Cryptography.CngPkcs8.TryExportEncryptedPkcs8PrivateKey(this, password, pbeParameters, destination, out bytesWritten);
228 }
static bool IsPlatformScheme(PbeParameters pbeParameters)
Definition CngPkcs8.cs:44
static bool TryExportEncryptedPkcs8PrivateKey(AsymmetricAlgorithm key, ReadOnlySpan< byte > passwordBytes, PbeParameters pbeParameters, Span< byte > destination, out int bytesWritten)
Definition CngPkcs8.cs:68
bool TryExportEncryptedPkcs8(ReadOnlySpan< char > pkcs8Password, int kdfCount, Span< byte > destination, out int bytesWritten)
Definition DSACng.cs:91
static void ValidatePbeParameters(PbeParameters pbeParameters, ReadOnlySpan< char > password, ReadOnlySpan< byte > passwordBytes)

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