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

◆ ExportNamedCurveParameters()

static unsafe void Internal.Cryptography.Pal.X509Pal.ExportNamedCurveParameters ( ref ECParameters ecParams,
byte[] ecBlob,
bool includePrivateParameters )
inlinestaticprivate

Definition at line 319 of file X509Pal.cs.

320 {
321 fixed (byte* ptr = &ecBlob[0])
322 {
323 global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB* ptr2 = (global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB*)ptr;
324 int offset = sizeof(global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB);
325 ecParams.Q = new ECPoint
326 {
327 X = global::Interop.BCrypt.Consume(ecBlob, ref offset, ptr2->cbKey),
328 Y = global::Interop.BCrypt.Consume(ecBlob, ref offset, ptr2->cbKey)
329 };
330 if (includePrivateParameters)
331 {
332 ecParams.D = global::Interop.BCrypt.Consume(ecBlob, ref offset, ptr2->cbKey);
333 }
334 }
335 }

References System.offset, System.X, and System.Y.

Referenced by Internal.Cryptography.Pal.X509Pal.DecodeECPublicKey< TAlgorithm >().