95 {
96 bool flag = parameters.D != null;
97 int num = sizeof(global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB) + parameters.Q.X.Length + parameters.Q.Y.Length;
98 if (flag)
99 {
100 num += parameters.D.Length;
101 }
102 byte[]
array =
new byte[num];
103 fixed (
byte* ptr = &
array[0])
104 {
105 global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB* ptr2 = (global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB*)ptr;
107 ptr2->cbKey = parameters.Q.X.Length;
108 int offset =
sizeof(global::Interop.BCrypt.BCRYPT_ECCKEY_BLOB);
109 global::Interop.BCrypt.Emit(
array, ref
offset, parameters.Q.X);
110 global::Interop.BCrypt.Emit(
array, ref
offset, parameters.Q.Y);
111 if (flag)
112 {
113 global::Interop.BCrypt.Emit(
array, ref
offset, parameters.D);
114 }
115 }
117 }
static global::Interop.BCrypt.KeyBlobMagicNumber EcdsaCurveNameToMagicNumber(string name, bool includePrivateParameters)
static global::Interop.BCrypt.KeyBlobMagicNumber EcdhCurveNameToMagicNumber(string name, bool includePrivateParameters)