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

◆ ExportParameters()

override ECParameters System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ExportParameters ( bool includePrivateParameters)
inlinevirtual

Reimplemented from System.Security.Cryptography.ECDiffieHellman.

Definition at line 290 of file ECDiffieHellmanImplementation.cs.

291 {
292 ECParameters ecParams = default(ECParameters);
293 string oidValue;
294 string curveName = GetCurveName(out oidValue);
295 byte[] array = null;
296 try
297 {
298 if (string.IsNullOrEmpty(curveName))
299 {
300 array = ExportFullKeyBlob(includePrivateParameters);
301 ECCng.ExportPrimeCurveParameters(ref ecParams, array, includePrivateParameters);
302 }
303 else
304 {
305 array = ExportKeyBlob(includePrivateParameters);
306 ECCng.ExportNamedCurveParameters(ref ecParams, array, includePrivateParameters);
307 ecParams.Curve = ECCurve.CreateFromOid(new Oid(oidValue, curveName));
308 }
309 return ecParams;
310 }
311 finally
312 {
313 if (array != null)
314 {
315 Array.Clear(array);
316 }
317 }
318 }

References System.array, System.Array.Clear(), System.Security.Cryptography.ECCurve.CreateFromOid(), System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ExportFullKeyBlob(), System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ExportKeyBlob(), System.Security.Cryptography.ECCng.ExportNamedCurveParameters(), System.Security.Cryptography.ECCng.ExportPrimeCurveParameters(), and System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.GetCurveName().