Skip to content

Commit 6ddabaf

Browse files
authored
[Android] Rename System.Security.Cryptography.Native.OpenSsl on Android (#52406)
* Rename System.Security.Cryptography.Native.OpenSsl to System.Security.Cryptography.Native.Android on Android and split remaining shared Interop files.
1 parent be19e1c commit 6ddabaf

File tree

31 files changed

+531
-144
lines changed

31 files changed

+531
-144
lines changed

src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@
9494
<PlatformManifestFileEntry Include="libSystem.Net.Security.Native.so" IsNative="true" />
9595
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.Apple.a" IsNative="true" />
9696
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.Apple.dylib" IsNative="true" />
97+
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.Android.a" IsNative="true" />
98+
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.Android.so" IsNative="true" />
9799
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.OpenSsl.a" IsNative="true" />
98100
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.OpenSsl.dylib" IsNative="true" />
99101
<PlatformManifestFileEntry Include="libSystem.Security.Cryptography.Native.OpenSsl.so" IsNative="true" />

src/libraries/Common/src/Interop/Android/Interop.JObjectLifetime.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ internal static partial class Interop
1010
{
1111
internal static partial class JObjectLifetime
1212
{
13-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_NewGlobalReference")]
13+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_NewGlobalReference")]
1414
internal static extern IntPtr NewGlobalReference(IntPtr obj);
1515

16-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DeleteGlobalReference")]
16+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DeleteGlobalReference")]
1717
internal static extern void DeleteGlobalReference(IntPtr obj);
1818

1919
internal class SafeJObjectHandle : SafeHandle

src/libraries/Common/src/Interop/Android/Interop.Libraries.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ internal static partial class Interop
66
internal static partial class Libraries
77
{
88
internal const string Liblog = "liblog";
9+
internal const string AndroidCryptoNative = "libSystem.Security.Cryptography.Native.Android";
910
}
1011
}

src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Bignum.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ internal static partial class Interop
1010
// TODO: [AndroidCrypto] Rename class to AndroidCrypto once all consumers are split in Android vs. Unix
1111
internal static partial class Crypto
1212
{
13-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_BigNumToBinary")]
13+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_BigNumToBinary")]
1414
private static extern unsafe int BigNumToBinary(SafeBignumHandle a, byte* to);
1515

16-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_GetBigNumBytes")]
16+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_GetBigNumBytes")]
1717
private static extern int GetBigNumBytes(SafeBignumHandle a);
1818

1919
internal static unsafe byte[]? ExtractBignum(SafeBignumHandle? bignum, int targetSize)

src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static partial class Interop
1010
{
1111
internal static partial class Crypto
1212
{
13-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherCreate")]
13+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherCreate")]
1414
internal static extern SafeEvpCipherCtxHandle EvpCipherCreate(
1515
IntPtr cipher,
1616
ref byte key,
@@ -19,11 +19,11 @@ internal static extern SafeEvpCipherCtxHandle EvpCipherCreate(
1919
ref byte iv,
2020
int enc);
2121

22-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherCreatePartial")]
22+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherCreatePartial")]
2323
internal static extern SafeEvpCipherCtxHandle EvpCipherCreatePartial(
2424
IntPtr cipher);
2525

26-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetKeyAndIV")]
26+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetKeyAndIV")]
2727
[return: MarshalAs(UnmanagedType.Bool)]
2828
private static extern bool EvpCipherSetKeyAndIV(
2929
SafeEvpCipherCtxHandle ctx,
@@ -47,7 +47,7 @@ ref MemoryMarshal.GetReference(iv),
4747
}
4848
}
4949

50-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetNonceLength")]
50+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetNonceLength")]
5151
[return: MarshalAs(UnmanagedType.Bool)]
5252
private static extern bool AndroidCryptoNative_CipherSetNonceLength(
5353
SafeEvpCipherCtxHandle ctx, int nonceLength);
@@ -60,18 +60,18 @@ internal static void CipherSetNonceLength(SafeEvpCipherCtxHandle ctx, int nonceL
6060
}
6161
}
6262

63-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherDestroy")]
63+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherDestroy")]
6464
internal static extern void EvpCipherDestroy(IntPtr ctx);
6565

66-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherReset")]
66+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherReset")]
6767
[return: MarshalAs(UnmanagedType.Bool)]
6868
internal static extern bool EvpCipherReset(SafeEvpCipherCtxHandle ctx);
6969

70-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherCtxSetPadding")]
70+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherCtxSetPadding")]
7171
[return: MarshalAs(UnmanagedType.Bool)]
7272
internal static extern bool EvpCipherCtxSetPadding(SafeEvpCipherCtxHandle x, int padding);
7373

74-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherUpdate")]
74+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherUpdate")]
7575
[return: MarshalAs(UnmanagedType.Bool)]
7676
private static extern bool EvpCipherUpdate(
7777
SafeEvpCipherCtxHandle ctx,
@@ -94,7 +94,7 @@ ref MemoryMarshal.GetReference(input),
9494
input.Length);
9595
}
9696

97-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherUpdateAAD")]
97+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherUpdateAAD")]
9898
[return: MarshalAs(UnmanagedType.Bool)]
9999
private static extern bool CipherUpdateAAD(
100100
SafeEvpCipherCtxHandle ctx,
@@ -114,7 +114,7 @@ ref MemoryMarshal.GetReference(input),
114114
}
115115
}
116116

117-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherFinalEx")]
117+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherFinalEx")]
118118
[return: MarshalAs(UnmanagedType.Bool)]
119119
private static extern bool EvpCipherFinalEx(
120120
SafeEvpCipherCtxHandle ctx,
@@ -129,91 +129,91 @@ internal static bool EvpCipherFinalEx(
129129
return EvpCipherFinalEx(ctx, ref MemoryMarshal.GetReference(output), out bytesWritten);
130130
}
131131

132-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetTagLength")]
132+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetTagLength")]
133133
[return: MarshalAs(UnmanagedType.Bool)]
134134
internal static extern bool CipherSetTagLength(
135135
SafeEvpCipherCtxHandle ctx,
136136
int tagLength);
137137

138-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Ecb")]
138+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Ecb")]
139139
internal static extern IntPtr EvpAes128Ecb();
140140

141-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cbc")]
141+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cbc")]
142142
internal static extern IntPtr EvpAes128Cbc();
143143

144-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Gcm")]
144+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Gcm")]
145145
internal static extern IntPtr EvpAes128Gcm();
146146

147-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cfb8")]
147+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cfb8")]
148148
internal static extern IntPtr EvpAes128Cfb8();
149149

150-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cfb128")]
150+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Cfb128")]
151151
internal static extern IntPtr EvpAes128Cfb128();
152152

153-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Ccm")]
153+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes128Ccm")]
154154
internal static extern IntPtr EvpAes128Ccm();
155155

156-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Ecb")]
156+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Ecb")]
157157
internal static extern IntPtr EvpAes192Ecb();
158158

159-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cbc")]
159+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cbc")]
160160
internal static extern IntPtr EvpAes192Cbc();
161161

162-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Gcm")]
162+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Gcm")]
163163
internal static extern IntPtr EvpAes192Gcm();
164164

165-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cfb8")]
165+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cfb8")]
166166
internal static extern IntPtr EvpAes192Cfb8();
167167

168-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cfb128")]
168+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Cfb128")]
169169
internal static extern IntPtr EvpAes192Cfb128();
170170

171-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Ccm")]
171+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes192Ccm")]
172172
internal static extern IntPtr EvpAes192Ccm();
173173

174-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Ecb")]
174+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Ecb")]
175175
internal static extern IntPtr EvpAes256Ecb();
176176

177-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cbc")]
177+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cbc")]
178178
internal static extern IntPtr EvpAes256Cbc();
179179

180-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Gcm")]
180+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Gcm")]
181181
internal static extern IntPtr EvpAes256Gcm();
182182

183-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cfb128")]
183+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cfb128")]
184184
internal static extern IntPtr EvpAes256Cfb128();
185185

186-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cfb8")]
186+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Cfb8")]
187187
internal static extern IntPtr EvpAes256Cfb8();
188188

189-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Ccm")]
189+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Aes256Ccm")]
190190
internal static extern IntPtr EvpAes256Ccm();
191191

192-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DesCbc")]
192+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DesCbc")]
193193
internal static extern IntPtr EvpDesCbc();
194194

195-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DesEcb")]
195+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DesEcb")]
196196
internal static extern IntPtr EvpDesEcb();
197197

198-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DesCfb8")]
198+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DesCfb8")]
199199
internal static extern IntPtr EvpDesCfb8();
200200

201-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cbc")]
201+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cbc")]
202202
internal static extern IntPtr EvpDes3Cbc();
203203

204-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Des3Ecb")]
204+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Des3Ecb")]
205205
internal static extern IntPtr EvpDes3Ecb();
206206

207-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cfb8")]
207+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cfb8")]
208208
internal static extern IntPtr EvpDes3Cfb8();
209209

210-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cfb64")]
210+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_Des3Cfb64")]
211211
internal static extern IntPtr EvpDes3Cfb64();
212212

213-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_RC2Cbc")]
213+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_RC2Cbc")]
214214
internal static extern IntPtr EvpRC2Cbc();
215215

216-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_RC2Ecb")]
216+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_RC2Ecb")]
217217
internal static extern IntPtr EvpRC2Ecb();
218218

219219
internal enum EvpCipherDirection : int

src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Dsa.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ internal static partial class Interop
1111
{
1212
internal static partial class AndroidCrypto
1313
{
14-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaGenerateKey")]
14+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaGenerateKey")]
1515
[return: MarshalAs(UnmanagedType.Bool)]
1616
internal static extern bool DsaGenerateKey(out SafeDsaHandle dsa, int bits);
1717

18-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaSizeSignature")]
18+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaSizeSignature")]
1919
private static extern int DsaSizeSignature(SafeDsaHandle dsa);
2020

2121
/// <summary>
@@ -27,7 +27,7 @@ internal static int DsaEncodedSignatureSize(SafeDsaHandle dsa)
2727
return size;
2828
}
2929

30-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaSignatureFieldSize")]
30+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaSignatureFieldSize")]
3131
private static extern int AndroidCryptoNative_DsaSignatureFieldSize(SafeDsaHandle dsa);
3232

3333
/// <summary>
@@ -41,7 +41,7 @@ internal static int DsaSignatureFieldSize(SafeDsaHandle dsa)
4141
return size;
4242
}
4343

44-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaSizeP")]
44+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaSizeP")]
4545
private static extern int DsaSizeP(SafeDsaHandle dsa);
4646

4747
/// <summary>
@@ -59,7 +59,7 @@ internal static int DsaKeySize(SafeDsaHandle dsa)
5959
internal static bool DsaSign(SafeDsaHandle dsa, ReadOnlySpan<byte> hash, Span<byte> refSignature, out int outSignatureLength) =>
6060
DsaSign(dsa, ref MemoryMarshal.GetReference(hash), hash.Length, ref MemoryMarshal.GetReference(refSignature), out outSignatureLength);
6161

62-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaSign")]
62+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaSign")]
6363
[return: MarshalAs(UnmanagedType.Bool)]
6464
private static extern bool DsaSign(SafeDsaHandle dsa, ref byte hash, int hashLength, ref byte refSignature, out int outSignatureLength);
6565

@@ -80,7 +80,7 @@ ref MemoryMarshal.GetReference(signature),
8080
return ret == 1;
8181
}
8282

83-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaVerify")]
83+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaVerify")]
8484
private static extern int DsaVerify(SafeDsaHandle dsa, ref byte hash, int hashLength, ref byte signature, int signatureLength);
8585

8686
internal static DSAParameters ExportDsaParameters(SafeDsaHandle key, bool includePrivateParameters)
@@ -141,7 +141,7 @@ internal static DSAParameters ExportDsaParameters(SafeDsaHandle key, bool includ
141141
}
142142
}
143143

144-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_GetDsaParameters")]
144+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_GetDsaParameters")]
145145
[return: MarshalAs(UnmanagedType.Bool)]
146146
private static extern bool GetDsaParameters(
147147
SafeDsaHandle key,
@@ -151,7 +151,7 @@ private static extern bool GetDsaParameters(
151151
out SafeBignumHandle y, out int y_cb,
152152
out SafeBignumHandle x, out int x_cb);
153153

154-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_DsaKeyCreateByExplicitParameters")]
154+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_DsaKeyCreateByExplicitParameters")]
155155
[return: MarshalAs(UnmanagedType.Bool)]
156156
internal static extern bool DsaKeyCreateByExplicitParameters(
157157
out SafeDsaHandle dsa,

src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.EcDsa.ImportExport.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static partial class Interop
1010
{
1111
internal static partial class AndroidCrypto
1212
{
13-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_EcKeyCreateByKeyParameters", CharSet = CharSet.Ansi)]
13+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_EcKeyCreateByKeyParameters", CharSet = CharSet.Ansi)]
1414
private static extern int EcKeyCreateByKeyParameters(
1515
out SafeEcKeyHandle key,
1616
string oid,
@@ -35,7 +35,7 @@ internal static SafeEcKeyHandle EcKeyCreateByKeyParameters(
3535
return key;
3636
}
3737

38-
[DllImport(Libraries.CryptoNative, EntryPoint = "AndroidCryptoNative_EcKeyCreateByExplicitParameters")]
38+
[DllImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_EcKeyCreateByExplicitParameters")]
3939
internal static extern SafeEcKeyHandle EcKeyCreateByExplicitParameters(
4040
ECCurve.ECCurveType curveType,
4141
byte[]? qx, int qxLength,
@@ -91,7 +91,7 @@ internal static SafeEcKeyHandle EcKeyCreateByExplicitCurve(ECCurve curve)
9191
}
9292

9393

94-
[DllImport(Libraries.CryptoNative)]
94+
[DllImport(Libraries.AndroidCryptoNative)]
9595
private static extern int AndroidCryptoNative_GetECKeyParameters(
9696
SafeEcKeyHandle key,
9797
bool includePrivate,
@@ -149,7 +149,7 @@ internal static ECParameters GetECKeyParameters(
149149
return parameters;
150150
}
151151

152-
[DllImport(Libraries.CryptoNative)]
152+
[DllImport(Libraries.AndroidCryptoNative)]
153153
private static extern int AndroidCryptoNative_GetECCurveParameters(
154154
SafeEcKeyHandle key,
155155
bool includePrivate,

0 commit comments

Comments
 (0)