@tokamakdev/plugin-secure-storage 0.1.0-beta.107 → 0.1.0-beta.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/android/Bindings.kt +356 -0
- package/android/SecureStoragePlugin.kt +27 -21
- package/android/bindings.ts +1166 -0
- package/apple/SecureStoragePlugin.swift +27 -16
- package/package.json +4 -3
- package/src/index.ts +4 -4
- package/tokamak-plugin.json +45 -4
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
// Generated by `tok bindings` from the Android 35 SDK: android.security.keystore, java.security.KeyStore, javax.crypto.Cipher, javax.crypto.KeyGenerator. Do not edit.
|
|
2
|
+
import { Bindings, NativeObject, type Classes, type TokamakContext } from "@tokamakdev/plugin/bindings";
|
|
3
|
+
|
|
4
|
+
const bindings = new Bindings("secure-storage/android", () => classes);
|
|
5
|
+
|
|
6
|
+
/** Android API 31+ */
|
|
7
|
+
export class BackendBusyException extends NativeObject {
|
|
8
|
+
/** Android API 31+ */
|
|
9
|
+
static new(ctx: TokamakContext, backOffHintMillis: number): Promise<BackendBusyException>;
|
|
10
|
+
/** Android API 31+ */
|
|
11
|
+
static new(ctx: TokamakContext, backOffHintMillis: number, message: string): Promise<BackendBusyException>;
|
|
12
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
13
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
14
|
+
["BackendBusyException#<init>(J)V", [["number"]]],
|
|
15
|
+
["BackendBusyException#<init>(JLjava/lang/String;)V", [["number"], ["string"]]],
|
|
16
|
+
]), args);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Android API 31+ */
|
|
20
|
+
getBackOffHintMillis(): Promise<number> {
|
|
21
|
+
return bindings.call(this, "BackendBusyException#getBackOffHintMillis()J", []);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Android API 23+ */
|
|
26
|
+
export class KeyExpiredException extends NativeObject {
|
|
27
|
+
/** Android API 23+ */
|
|
28
|
+
static new(ctx: TokamakContext, ): Promise<KeyExpiredException>;
|
|
29
|
+
/** Android API 23+ */
|
|
30
|
+
static new(ctx: TokamakContext, message: string | null): Promise<KeyExpiredException>;
|
|
31
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
32
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
33
|
+
["KeyExpiredException#<init>()V", []],
|
|
34
|
+
["KeyExpiredException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
35
|
+
]), args);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Android API 23+ */
|
|
40
|
+
export class KeyGenParameterSpec extends NativeObject {
|
|
41
|
+
/** Android API 23+ */
|
|
42
|
+
getKeystoreAlias(): Promise<string> {
|
|
43
|
+
return bindings.call(this, "KeyGenParameterSpec#getKeystoreAlias()Ljava/lang/String;", []);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Android API 23+ */
|
|
47
|
+
getKeySize(): Promise<number> {
|
|
48
|
+
return bindings.call(this, "KeyGenParameterSpec#getKeySize()I", []);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Android API 23+ */
|
|
52
|
+
getPurposes(): Promise<number> {
|
|
53
|
+
return bindings.call(this, "KeyGenParameterSpec#getPurposes()I", []);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Android API 23+ */
|
|
57
|
+
getDigests(): Promise<(string | null)[]> {
|
|
58
|
+
return bindings.call(this, "KeyGenParameterSpec#getDigests()[Ljava/lang/String;", []);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Android API 23+ */
|
|
62
|
+
isDigestsSpecified(): Promise<boolean> {
|
|
63
|
+
return bindings.call(this, "KeyGenParameterSpec#isDigestsSpecified()Z", []);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Android API 23+ */
|
|
67
|
+
getEncryptionPaddings(): Promise<(string | null)[]> {
|
|
68
|
+
return bindings.call(this, "KeyGenParameterSpec#getEncryptionPaddings()[Ljava/lang/String;", []);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Android API 23+ */
|
|
72
|
+
getSignaturePaddings(): Promise<(string | null)[]> {
|
|
73
|
+
return bindings.call(this, "KeyGenParameterSpec#getSignaturePaddings()[Ljava/lang/String;", []);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Android API 23+ */
|
|
77
|
+
getBlockModes(): Promise<(string | null)[]> {
|
|
78
|
+
return bindings.call(this, "KeyGenParameterSpec#getBlockModes()[Ljava/lang/String;", []);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Android API 23+ */
|
|
82
|
+
isRandomizedEncryptionRequired(): Promise<boolean> {
|
|
83
|
+
return bindings.call(this, "KeyGenParameterSpec#isRandomizedEncryptionRequired()Z", []);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Android API 23+ */
|
|
87
|
+
isUserAuthenticationRequired(): Promise<boolean> {
|
|
88
|
+
return bindings.call(this, "KeyGenParameterSpec#isUserAuthenticationRequired()Z", []);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Android API 23+ */
|
|
92
|
+
getUserAuthenticationValidityDurationSeconds(): Promise<number> {
|
|
93
|
+
return bindings.call(this, "KeyGenParameterSpec#getUserAuthenticationValidityDurationSeconds()I", []);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Android API 24+ */
|
|
97
|
+
getAttestationChallenge(): Promise<Uint8Array | null> {
|
|
98
|
+
return bindings.call(this, "KeyGenParameterSpec#getAttestationChallenge()[B", []);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Android API 24+ */
|
|
102
|
+
isUserAuthenticationValidWhileOnBody(): Promise<boolean> {
|
|
103
|
+
return bindings.call(this, "KeyGenParameterSpec#isUserAuthenticationValidWhileOnBody()Z", []);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Android API 24+ */
|
|
107
|
+
isInvalidatedByBiometricEnrollment(): Promise<boolean> {
|
|
108
|
+
return bindings.call(this, "KeyGenParameterSpec#isInvalidatedByBiometricEnrollment()Z", []);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Android API 28+ */
|
|
112
|
+
isUserConfirmationRequired(): Promise<boolean> {
|
|
113
|
+
return bindings.call(this, "KeyGenParameterSpec#isUserConfirmationRequired()Z", []);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Android API 28+ */
|
|
117
|
+
isUserPresenceRequired(): Promise<boolean> {
|
|
118
|
+
return bindings.call(this, "KeyGenParameterSpec#isUserPresenceRequired()Z", []);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Android API 28+ */
|
|
122
|
+
isStrongBoxBacked(): Promise<boolean> {
|
|
123
|
+
return bindings.call(this, "KeyGenParameterSpec#isStrongBoxBacked()Z", []);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Android API 28+ */
|
|
127
|
+
isUnlockedDeviceRequired(): Promise<boolean> {
|
|
128
|
+
return bindings.call(this, "KeyGenParameterSpec#isUnlockedDeviceRequired()Z", []);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Android API 30+ */
|
|
132
|
+
getUserAuthenticationType(): Promise<number> {
|
|
133
|
+
return bindings.call(this, "KeyGenParameterSpec#getUserAuthenticationType()I", []);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Android API 31+ */
|
|
137
|
+
isDevicePropertiesAttestationIncluded(): Promise<boolean> {
|
|
138
|
+
return bindings.call(this, "KeyGenParameterSpec#isDevicePropertiesAttestationIncluded()Z", []);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** Android API 31+ */
|
|
142
|
+
getMaxUsageCount(): Promise<number> {
|
|
143
|
+
return bindings.call(this, "KeyGenParameterSpec#getMaxUsageCount()I", []);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Android API 31+ */
|
|
147
|
+
getAttestKeyAlias(): Promise<string | null> {
|
|
148
|
+
return bindings.call(this, "KeyGenParameterSpec#getAttestKeyAlias()Ljava/lang/String;", []);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** Android API 35+ */
|
|
152
|
+
getMgf1Digests(): Promise<(string | null)[]> {
|
|
153
|
+
return bindings.call(this, "KeyGenParameterSpec#getMgf1Digests()Ljava/util/Set;", []);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** Android API 35+ */
|
|
157
|
+
isMgf1DigestsSpecified(): Promise<boolean> {
|
|
158
|
+
return bindings.call(this, "KeyGenParameterSpec#isMgf1DigestsSpecified()Z", []);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Android API 23+ */
|
|
163
|
+
export class KeyGenParameterSpec$Builder extends NativeObject {
|
|
164
|
+
/** Android API 23+ */
|
|
165
|
+
static new(ctx: TokamakContext, keystoreAlias: string, purposes: number): Promise<KeyGenParameterSpec$Builder> {
|
|
166
|
+
return bindings.call(ctx, "KeyGenParameterSpec.Builder#<init>(Ljava/lang/String;I)V", [keystoreAlias, purposes]);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Android API 23+ */
|
|
170
|
+
setKeySize(keySize: number): Promise<KeyGenParameterSpec$Builder> {
|
|
171
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setKeySize(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [keySize]);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Android API 23+ */
|
|
175
|
+
setDigests(digests: (string | null)[]): Promise<KeyGenParameterSpec$Builder> {
|
|
176
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setDigests([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [digests]);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Android API 23+ */
|
|
180
|
+
setEncryptionPaddings(paddings: (string | null)[]): Promise<KeyGenParameterSpec$Builder> {
|
|
181
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setEncryptionPaddings([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [paddings]);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Android API 23+ */
|
|
185
|
+
setSignaturePaddings(paddings: (string | null)[]): Promise<KeyGenParameterSpec$Builder> {
|
|
186
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setSignaturePaddings([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [paddings]);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Android API 23+ */
|
|
190
|
+
setBlockModes(blockModes: (string | null)[]): Promise<KeyGenParameterSpec$Builder> {
|
|
191
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setBlockModes([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [blockModes]);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** Android API 23+ */
|
|
195
|
+
setRandomizedEncryptionRequired(required: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
196
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setRandomizedEncryptionRequired(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [required]);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** Android API 23+ */
|
|
200
|
+
setUserAuthenticationRequired(required: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
201
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserAuthenticationRequired(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [required]);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Android API 23+
|
|
206
|
+
* @deprecated
|
|
207
|
+
*/
|
|
208
|
+
setUserAuthenticationValidityDurationSeconds(seconds: number): Promise<KeyGenParameterSpec$Builder> {
|
|
209
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserAuthenticationValidityDurationSeconds(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [seconds]);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Android API 23+ */
|
|
213
|
+
build(): Promise<KeyGenParameterSpec> {
|
|
214
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#build()Landroid/security/keystore/KeyGenParameterSpec;", []);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Android API 24+ */
|
|
218
|
+
setAttestationChallenge(attestationChallenge: Uint8Array | null): Promise<KeyGenParameterSpec$Builder> {
|
|
219
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setAttestationChallenge([B)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [attestationChallenge]);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Android API 24+ */
|
|
223
|
+
setUserAuthenticationValidWhileOnBody(remainsValid: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
224
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserAuthenticationValidWhileOnBody(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [remainsValid]);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** Android API 24+ */
|
|
228
|
+
setInvalidatedByBiometricEnrollment(invalidateKey: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
229
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setInvalidatedByBiometricEnrollment(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [invalidateKey]);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Android API 28+ */
|
|
233
|
+
setUserConfirmationRequired(required: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
234
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserConfirmationRequired(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [required]);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** Android API 28+ */
|
|
238
|
+
setUserPresenceRequired(required: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
239
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserPresenceRequired(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [required]);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** Android API 28+ */
|
|
243
|
+
setIsStrongBoxBacked(isStrongBoxBacked: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
244
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setIsStrongBoxBacked(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [isStrongBoxBacked]);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** Android API 28+ */
|
|
248
|
+
setUnlockedDeviceRequired(unlockedDeviceRequired: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
249
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUnlockedDeviceRequired(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [unlockedDeviceRequired]);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** Android API 30+ */
|
|
253
|
+
setUserAuthenticationParameters(timeout: number, type: number): Promise<KeyGenParameterSpec$Builder> {
|
|
254
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setUserAuthenticationParameters(II)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [timeout, type]);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** Android API 31+ */
|
|
258
|
+
setDevicePropertiesAttestationIncluded(devicePropertiesAttestationIncluded: boolean): Promise<KeyGenParameterSpec$Builder> {
|
|
259
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setDevicePropertiesAttestationIncluded(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [devicePropertiesAttestationIncluded]);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** Android API 31+ */
|
|
263
|
+
setMaxUsageCount(maxUsageCount: number): Promise<KeyGenParameterSpec$Builder> {
|
|
264
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setMaxUsageCount(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [maxUsageCount]);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** Android API 31+ */
|
|
268
|
+
setAttestKeyAlias(attestKeyAlias: string | null): Promise<KeyGenParameterSpec$Builder> {
|
|
269
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setAttestKeyAlias(Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [attestKeyAlias]);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** Android API 35+ */
|
|
273
|
+
setMgf1Digests(mgf1Digests: string[]): Promise<KeyGenParameterSpec$Builder> {
|
|
274
|
+
return bindings.call(this, "KeyGenParameterSpec.Builder#setMgf1Digests([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", [mgf1Digests]);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Android API 23+ */
|
|
279
|
+
export class KeyInfo extends NativeObject {
|
|
280
|
+
/** Android API 23+ */
|
|
281
|
+
getKeystoreAlias(): Promise<string | null> {
|
|
282
|
+
return bindings.call(this, "KeyInfo#getKeystoreAlias()Ljava/lang/String;", []);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Android API 23+
|
|
287
|
+
* @deprecated
|
|
288
|
+
*/
|
|
289
|
+
isInsideSecureHardware(): Promise<boolean> {
|
|
290
|
+
return bindings.call(this, "KeyInfo#isInsideSecureHardware()Z", []);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** Android API 23+ */
|
|
294
|
+
getOrigin(): Promise<number> {
|
|
295
|
+
return bindings.call(this, "KeyInfo#getOrigin()I", []);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** Android API 23+ */
|
|
299
|
+
getKeySize(): Promise<number> {
|
|
300
|
+
return bindings.call(this, "KeyInfo#getKeySize()I", []);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** Android API 23+ */
|
|
304
|
+
getPurposes(): Promise<number> {
|
|
305
|
+
return bindings.call(this, "KeyInfo#getPurposes()I", []);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** Android API 23+ */
|
|
309
|
+
getBlockModes(): Promise<(string | null)[]> {
|
|
310
|
+
return bindings.call(this, "KeyInfo#getBlockModes()[Ljava/lang/String;", []);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** Android API 23+ */
|
|
314
|
+
getEncryptionPaddings(): Promise<(string | null)[]> {
|
|
315
|
+
return bindings.call(this, "KeyInfo#getEncryptionPaddings()[Ljava/lang/String;", []);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** Android API 23+ */
|
|
319
|
+
getSignaturePaddings(): Promise<(string | null)[]> {
|
|
320
|
+
return bindings.call(this, "KeyInfo#getSignaturePaddings()[Ljava/lang/String;", []);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** Android API 23+ */
|
|
324
|
+
getDigests(): Promise<(string | null)[]> {
|
|
325
|
+
return bindings.call(this, "KeyInfo#getDigests()[Ljava/lang/String;", []);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** Android API 23+ */
|
|
329
|
+
isUserAuthenticationRequired(): Promise<boolean> {
|
|
330
|
+
return bindings.call(this, "KeyInfo#isUserAuthenticationRequired()Z", []);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** Android API 23+ */
|
|
334
|
+
getUserAuthenticationValidityDurationSeconds(): Promise<number> {
|
|
335
|
+
return bindings.call(this, "KeyInfo#getUserAuthenticationValidityDurationSeconds()I", []);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Android API 23+ */
|
|
339
|
+
isUserAuthenticationRequirementEnforcedBySecureHardware(): Promise<boolean> {
|
|
340
|
+
return bindings.call(this, "KeyInfo#isUserAuthenticationRequirementEnforcedBySecureHardware()Z", []);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Android API 24+ */
|
|
344
|
+
isUserAuthenticationValidWhileOnBody(): Promise<boolean> {
|
|
345
|
+
return bindings.call(this, "KeyInfo#isUserAuthenticationValidWhileOnBody()Z", []);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** Android API 24+ */
|
|
349
|
+
isInvalidatedByBiometricEnrollment(): Promise<boolean> {
|
|
350
|
+
return bindings.call(this, "KeyInfo#isInvalidatedByBiometricEnrollment()Z", []);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** Android API 28+ */
|
|
354
|
+
isUserConfirmationRequired(): Promise<boolean> {
|
|
355
|
+
return bindings.call(this, "KeyInfo#isUserConfirmationRequired()Z", []);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** Android API 28+ */
|
|
359
|
+
isTrustedUserPresenceRequired(): Promise<boolean> {
|
|
360
|
+
return bindings.call(this, "KeyInfo#isTrustedUserPresenceRequired()Z", []);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** Android API 30+ */
|
|
364
|
+
getUserAuthenticationType(): Promise<number> {
|
|
365
|
+
return bindings.call(this, "KeyInfo#getUserAuthenticationType()I", []);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** Android API 31+ */
|
|
369
|
+
getSecurityLevel(): Promise<number> {
|
|
370
|
+
return bindings.call(this, "KeyInfo#getSecurityLevel()I", []);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** Android API 31+ */
|
|
374
|
+
getRemainingUsageCount(): Promise<number> {
|
|
375
|
+
return bindings.call(this, "KeyInfo#getRemainingUsageCount()I", []);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/** Android API 23+ */
|
|
380
|
+
export class KeyNotYetValidException extends NativeObject {
|
|
381
|
+
/** Android API 23+ */
|
|
382
|
+
static new(ctx: TokamakContext, ): Promise<KeyNotYetValidException>;
|
|
383
|
+
/** Android API 23+ */
|
|
384
|
+
static new(ctx: TokamakContext, message: string | null): Promise<KeyNotYetValidException>;
|
|
385
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
386
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
387
|
+
["KeyNotYetValidException#<init>()V", []],
|
|
388
|
+
["KeyNotYetValidException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
389
|
+
]), args);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** Android API 23+ */
|
|
394
|
+
export class KeyPermanentlyInvalidatedException extends NativeObject {
|
|
395
|
+
/** Android API 23+ */
|
|
396
|
+
static new(ctx: TokamakContext, ): Promise<KeyPermanentlyInvalidatedException>;
|
|
397
|
+
/** Android API 23+ */
|
|
398
|
+
static new(ctx: TokamakContext, message: string | null): Promise<KeyPermanentlyInvalidatedException>;
|
|
399
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
400
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
401
|
+
["KeyPermanentlyInvalidatedException#<init>()V", []],
|
|
402
|
+
["KeyPermanentlyInvalidatedException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
403
|
+
]), args);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/** Android API 23+ */
|
|
408
|
+
export class KeyProperties extends NativeObject {
|
|
409
|
+
/** Android API 30+ */
|
|
410
|
+
static readonly AUTH_BIOMETRIC_STRONG = 2;
|
|
411
|
+
|
|
412
|
+
/** Android API 30+ */
|
|
413
|
+
static readonly AUTH_DEVICE_CREDENTIAL = 1;
|
|
414
|
+
|
|
415
|
+
/** Android API 23+ */
|
|
416
|
+
static readonly BLOCK_MODE_CBC = "CBC";
|
|
417
|
+
|
|
418
|
+
/** Android API 23+ */
|
|
419
|
+
static readonly BLOCK_MODE_CTR = "CTR";
|
|
420
|
+
|
|
421
|
+
/** Android API 23+ */
|
|
422
|
+
static readonly BLOCK_MODE_ECB = "ECB";
|
|
423
|
+
|
|
424
|
+
/** Android API 23+ */
|
|
425
|
+
static readonly BLOCK_MODE_GCM = "GCM";
|
|
426
|
+
|
|
427
|
+
/** Android API 23+ */
|
|
428
|
+
static readonly DIGEST_MD5 = "MD5";
|
|
429
|
+
|
|
430
|
+
/** Android API 23+ */
|
|
431
|
+
static readonly DIGEST_NONE = "NONE";
|
|
432
|
+
|
|
433
|
+
/** Android API 23+ */
|
|
434
|
+
static readonly DIGEST_SHA1 = "SHA-1";
|
|
435
|
+
|
|
436
|
+
/** Android API 23+ */
|
|
437
|
+
static readonly DIGEST_SHA224 = "SHA-224";
|
|
438
|
+
|
|
439
|
+
/** Android API 23+ */
|
|
440
|
+
static readonly DIGEST_SHA256 = "SHA-256";
|
|
441
|
+
|
|
442
|
+
/** Android API 23+ */
|
|
443
|
+
static readonly DIGEST_SHA384 = "SHA-384";
|
|
444
|
+
|
|
445
|
+
/** Android API 23+ */
|
|
446
|
+
static readonly DIGEST_SHA512 = "SHA-512";
|
|
447
|
+
|
|
448
|
+
/** Android API 23+ */
|
|
449
|
+
static readonly ENCRYPTION_PADDING_NONE = "NoPadding";
|
|
450
|
+
|
|
451
|
+
/** Android API 23+ */
|
|
452
|
+
static readonly ENCRYPTION_PADDING_PKCS7 = "PKCS7Padding";
|
|
453
|
+
|
|
454
|
+
/** Android API 23+ */
|
|
455
|
+
static readonly ENCRYPTION_PADDING_RSA_OAEP = "OAEPPadding";
|
|
456
|
+
|
|
457
|
+
/** Android API 23+ */
|
|
458
|
+
static readonly ENCRYPTION_PADDING_RSA_PKCS1 = "PKCS1Padding";
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Android API 28+
|
|
462
|
+
* @deprecated
|
|
463
|
+
*/
|
|
464
|
+
static readonly KEY_ALGORITHM_3DES = "DESede";
|
|
465
|
+
|
|
466
|
+
/** Android API 23+ */
|
|
467
|
+
static readonly KEY_ALGORITHM_AES = "AES";
|
|
468
|
+
|
|
469
|
+
/** Android API 23+ */
|
|
470
|
+
static readonly KEY_ALGORITHM_EC = "EC";
|
|
471
|
+
|
|
472
|
+
/** Android API 23+ */
|
|
473
|
+
static readonly KEY_ALGORITHM_HMAC_SHA1 = "HmacSHA1";
|
|
474
|
+
|
|
475
|
+
/** Android API 23+ */
|
|
476
|
+
static readonly KEY_ALGORITHM_HMAC_SHA224 = "HmacSHA224";
|
|
477
|
+
|
|
478
|
+
/** Android API 23+ */
|
|
479
|
+
static readonly KEY_ALGORITHM_HMAC_SHA256 = "HmacSHA256";
|
|
480
|
+
|
|
481
|
+
/** Android API 23+ */
|
|
482
|
+
static readonly KEY_ALGORITHM_HMAC_SHA384 = "HmacSHA384";
|
|
483
|
+
|
|
484
|
+
/** Android API 23+ */
|
|
485
|
+
static readonly KEY_ALGORITHM_HMAC_SHA512 = "HmacSHA512";
|
|
486
|
+
|
|
487
|
+
/** Android API 23+ */
|
|
488
|
+
static readonly KEY_ALGORITHM_RSA = "RSA";
|
|
489
|
+
|
|
490
|
+
/** Android API 23+ */
|
|
491
|
+
static readonly ORIGIN_GENERATED = 1;
|
|
492
|
+
|
|
493
|
+
/** Android API 23+ */
|
|
494
|
+
static readonly ORIGIN_IMPORTED = 2;
|
|
495
|
+
|
|
496
|
+
/** Android API 28+ */
|
|
497
|
+
static readonly ORIGIN_SECURELY_IMPORTED = 8;
|
|
498
|
+
|
|
499
|
+
/** Android API 23+ */
|
|
500
|
+
static readonly ORIGIN_UNKNOWN = 4;
|
|
501
|
+
|
|
502
|
+
/** Android API 31+ */
|
|
503
|
+
static readonly PURPOSE_AGREE_KEY = 64;
|
|
504
|
+
|
|
505
|
+
/** Android API 31+ */
|
|
506
|
+
static readonly PURPOSE_ATTEST_KEY = 128;
|
|
507
|
+
|
|
508
|
+
/** Android API 23+ */
|
|
509
|
+
static readonly PURPOSE_DECRYPT = 2;
|
|
510
|
+
|
|
511
|
+
/** Android API 23+ */
|
|
512
|
+
static readonly PURPOSE_ENCRYPT = 1;
|
|
513
|
+
|
|
514
|
+
/** Android API 23+ */
|
|
515
|
+
static readonly PURPOSE_SIGN = 4;
|
|
516
|
+
|
|
517
|
+
/** Android API 23+ */
|
|
518
|
+
static readonly PURPOSE_VERIFY = 8;
|
|
519
|
+
|
|
520
|
+
/** Android API 28+ */
|
|
521
|
+
static readonly PURPOSE_WRAP_KEY = 32;
|
|
522
|
+
|
|
523
|
+
/** Android API 31+ */
|
|
524
|
+
static readonly SECURITY_LEVEL_SOFTWARE = 0;
|
|
525
|
+
|
|
526
|
+
/** Android API 31+ */
|
|
527
|
+
static readonly SECURITY_LEVEL_STRONGBOX = 2;
|
|
528
|
+
|
|
529
|
+
/** Android API 31+ */
|
|
530
|
+
static readonly SECURITY_LEVEL_TRUSTED_ENVIRONMENT = 1;
|
|
531
|
+
|
|
532
|
+
/** Android API 31+ */
|
|
533
|
+
static readonly SECURITY_LEVEL_UNKNOWN = -2;
|
|
534
|
+
|
|
535
|
+
/** Android API 31+ */
|
|
536
|
+
static readonly SECURITY_LEVEL_UNKNOWN_SECURE = -1;
|
|
537
|
+
|
|
538
|
+
/** Android API 23+ */
|
|
539
|
+
static readonly SIGNATURE_PADDING_RSA_PKCS1 = "PKCS1";
|
|
540
|
+
|
|
541
|
+
/** Android API 23+ */
|
|
542
|
+
static readonly SIGNATURE_PADDING_RSA_PSS = "PSS";
|
|
543
|
+
|
|
544
|
+
/** Android API 31+ */
|
|
545
|
+
static readonly UNRESTRICTED_USAGE_COUNT = -1;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/** Android API 23+ */
|
|
549
|
+
export class KeyProtection extends NativeObject {
|
|
550
|
+
/** Android API 23+ */
|
|
551
|
+
getPurposes(): Promise<number> {
|
|
552
|
+
return bindings.call(this, "KeyProtection#getPurposes()I", []);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/** Android API 23+ */
|
|
556
|
+
getEncryptionPaddings(): Promise<(string | null)[]> {
|
|
557
|
+
return bindings.call(this, "KeyProtection#getEncryptionPaddings()[Ljava/lang/String;", []);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/** Android API 23+ */
|
|
561
|
+
getSignaturePaddings(): Promise<(string | null)[]> {
|
|
562
|
+
return bindings.call(this, "KeyProtection#getSignaturePaddings()[Ljava/lang/String;", []);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** Android API 23+ */
|
|
566
|
+
getDigests(): Promise<(string | null)[]> {
|
|
567
|
+
return bindings.call(this, "KeyProtection#getDigests()[Ljava/lang/String;", []);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/** Android API 23+ */
|
|
571
|
+
isDigestsSpecified(): Promise<boolean> {
|
|
572
|
+
return bindings.call(this, "KeyProtection#isDigestsSpecified()Z", []);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/** Android API 23+ */
|
|
576
|
+
getBlockModes(): Promise<(string | null)[]> {
|
|
577
|
+
return bindings.call(this, "KeyProtection#getBlockModes()[Ljava/lang/String;", []);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/** Android API 23+ */
|
|
581
|
+
isRandomizedEncryptionRequired(): Promise<boolean> {
|
|
582
|
+
return bindings.call(this, "KeyProtection#isRandomizedEncryptionRequired()Z", []);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/** Android API 23+ */
|
|
586
|
+
isUserAuthenticationRequired(): Promise<boolean> {
|
|
587
|
+
return bindings.call(this, "KeyProtection#isUserAuthenticationRequired()Z", []);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Android API 23+ */
|
|
591
|
+
getUserAuthenticationValidityDurationSeconds(): Promise<number> {
|
|
592
|
+
return bindings.call(this, "KeyProtection#getUserAuthenticationValidityDurationSeconds()I", []);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/** Android API 24+ */
|
|
596
|
+
isUserAuthenticationValidWhileOnBody(): Promise<boolean> {
|
|
597
|
+
return bindings.call(this, "KeyProtection#isUserAuthenticationValidWhileOnBody()Z", []);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/** Android API 24+ */
|
|
601
|
+
isInvalidatedByBiometricEnrollment(): Promise<boolean> {
|
|
602
|
+
return bindings.call(this, "KeyProtection#isInvalidatedByBiometricEnrollment()Z", []);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** Android API 28+ */
|
|
606
|
+
isUserConfirmationRequired(): Promise<boolean> {
|
|
607
|
+
return bindings.call(this, "KeyProtection#isUserConfirmationRequired()Z", []);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/** Android API 28+ */
|
|
611
|
+
isUserPresenceRequired(): Promise<boolean> {
|
|
612
|
+
return bindings.call(this, "KeyProtection#isUserPresenceRequired()Z", []);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/** Android API 28+ */
|
|
616
|
+
isUnlockedDeviceRequired(): Promise<boolean> {
|
|
617
|
+
return bindings.call(this, "KeyProtection#isUnlockedDeviceRequired()Z", []);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** Android API 30+ */
|
|
621
|
+
getUserAuthenticationType(): Promise<number> {
|
|
622
|
+
return bindings.call(this, "KeyProtection#getUserAuthenticationType()I", []);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/** Android API 31+ */
|
|
626
|
+
getMaxUsageCount(): Promise<number> {
|
|
627
|
+
return bindings.call(this, "KeyProtection#getMaxUsageCount()I", []);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/** Android API 35+ */
|
|
631
|
+
getMgf1Digests(): Promise<(string | null)[]> {
|
|
632
|
+
return bindings.call(this, "KeyProtection#getMgf1Digests()Ljava/util/Set;", []);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/** Android API 35+ */
|
|
636
|
+
isMgf1DigestsSpecified(): Promise<boolean> {
|
|
637
|
+
return bindings.call(this, "KeyProtection#isMgf1DigestsSpecified()Z", []);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/** Android API 23+ */
|
|
642
|
+
export class KeyProtection$Builder extends NativeObject {
|
|
643
|
+
/** Android API 23+ */
|
|
644
|
+
static new(ctx: TokamakContext, purposes: number): Promise<KeyProtection$Builder> {
|
|
645
|
+
return bindings.call(ctx, "KeyProtection.Builder#<init>(I)V", [purposes]);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/** Android API 23+ */
|
|
649
|
+
setEncryptionPaddings(paddings: (string | null)[]): Promise<KeyProtection$Builder> {
|
|
650
|
+
return bindings.call(this, "KeyProtection.Builder#setEncryptionPaddings([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", [paddings]);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/** Android API 23+ */
|
|
654
|
+
setSignaturePaddings(paddings: (string | null)[]): Promise<KeyProtection$Builder> {
|
|
655
|
+
return bindings.call(this, "KeyProtection.Builder#setSignaturePaddings([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", [paddings]);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/** Android API 23+ */
|
|
659
|
+
setDigests(digests: (string | null)[]): Promise<KeyProtection$Builder> {
|
|
660
|
+
return bindings.call(this, "KeyProtection.Builder#setDigests([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", [digests]);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/** Android API 23+ */
|
|
664
|
+
setBlockModes(blockModes: (string | null)[]): Promise<KeyProtection$Builder> {
|
|
665
|
+
return bindings.call(this, "KeyProtection.Builder#setBlockModes([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", [blockModes]);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/** Android API 23+ */
|
|
669
|
+
setRandomizedEncryptionRequired(required: boolean): Promise<KeyProtection$Builder> {
|
|
670
|
+
return bindings.call(this, "KeyProtection.Builder#setRandomizedEncryptionRequired(Z)Landroid/security/keystore/KeyProtection$Builder;", [required]);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** Android API 23+ */
|
|
674
|
+
setUserAuthenticationRequired(required: boolean): Promise<KeyProtection$Builder> {
|
|
675
|
+
return bindings.call(this, "KeyProtection.Builder#setUserAuthenticationRequired(Z)Landroid/security/keystore/KeyProtection$Builder;", [required]);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Android API 23+
|
|
680
|
+
* @deprecated
|
|
681
|
+
*/
|
|
682
|
+
setUserAuthenticationValidityDurationSeconds(seconds: number): Promise<KeyProtection$Builder> {
|
|
683
|
+
return bindings.call(this, "KeyProtection.Builder#setUserAuthenticationValidityDurationSeconds(I)Landroid/security/keystore/KeyProtection$Builder;", [seconds]);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/** Android API 23+ */
|
|
687
|
+
build(): Promise<KeyProtection> {
|
|
688
|
+
return bindings.call(this, "KeyProtection.Builder#build()Landroid/security/keystore/KeyProtection;", []);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/** Android API 24+ */
|
|
692
|
+
setUserAuthenticationValidWhileOnBody(remainsValid: boolean): Promise<KeyProtection$Builder> {
|
|
693
|
+
return bindings.call(this, "KeyProtection.Builder#setUserAuthenticationValidWhileOnBody(Z)Landroid/security/keystore/KeyProtection$Builder;", [remainsValid]);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/** Android API 24+ */
|
|
697
|
+
setInvalidatedByBiometricEnrollment(invalidateKey: boolean): Promise<KeyProtection$Builder> {
|
|
698
|
+
return bindings.call(this, "KeyProtection.Builder#setInvalidatedByBiometricEnrollment(Z)Landroid/security/keystore/KeyProtection$Builder;", [invalidateKey]);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/** Android API 28+ */
|
|
702
|
+
setUserConfirmationRequired(required: boolean): Promise<KeyProtection$Builder> {
|
|
703
|
+
return bindings.call(this, "KeyProtection.Builder#setUserConfirmationRequired(Z)Landroid/security/keystore/KeyProtection$Builder;", [required]);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/** Android API 28+ */
|
|
707
|
+
setUserPresenceRequired(required: boolean): Promise<KeyProtection$Builder> {
|
|
708
|
+
return bindings.call(this, "KeyProtection.Builder#setUserPresenceRequired(Z)Landroid/security/keystore/KeyProtection$Builder;", [required]);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/** Android API 28+ */
|
|
712
|
+
setUnlockedDeviceRequired(unlockedDeviceRequired: boolean): Promise<KeyProtection$Builder> {
|
|
713
|
+
return bindings.call(this, "KeyProtection.Builder#setUnlockedDeviceRequired(Z)Landroid/security/keystore/KeyProtection$Builder;", [unlockedDeviceRequired]);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** Android API 30+ */
|
|
717
|
+
setUserAuthenticationParameters(timeout: number, type: number): Promise<KeyProtection$Builder> {
|
|
718
|
+
return bindings.call(this, "KeyProtection.Builder#setUserAuthenticationParameters(II)Landroid/security/keystore/KeyProtection$Builder;", [timeout, type]);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/** Android API 31+ */
|
|
722
|
+
setIsStrongBoxBacked(isStrongBoxBacked: boolean): Promise<KeyProtection$Builder> {
|
|
723
|
+
return bindings.call(this, "KeyProtection.Builder#setIsStrongBoxBacked(Z)Landroid/security/keystore/KeyProtection$Builder;", [isStrongBoxBacked]);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/** Android API 31+ */
|
|
727
|
+
setMaxUsageCount(maxUsageCount: number): Promise<KeyProtection$Builder> {
|
|
728
|
+
return bindings.call(this, "KeyProtection.Builder#setMaxUsageCount(I)Landroid/security/keystore/KeyProtection$Builder;", [maxUsageCount]);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/** Android API 35+ */
|
|
732
|
+
setMgf1Digests(mgf1Digests: (string | null)[]): Promise<KeyProtection$Builder> {
|
|
733
|
+
return bindings.call(this, "KeyProtection.Builder#setMgf1Digests([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", [mgf1Digests]);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/** Android API 28+ */
|
|
738
|
+
export class SecureKeyImportUnavailableException extends NativeObject {
|
|
739
|
+
/** Android API 28+ */
|
|
740
|
+
static new(ctx: TokamakContext, ): Promise<SecureKeyImportUnavailableException>;
|
|
741
|
+
/** Android API 28+ */
|
|
742
|
+
static new(ctx: TokamakContext, message: string | null): Promise<SecureKeyImportUnavailableException>;
|
|
743
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
744
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
745
|
+
["SecureKeyImportUnavailableException#<init>()V", []],
|
|
746
|
+
["SecureKeyImportUnavailableException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
747
|
+
]), args);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/** Android API 28+ */
|
|
752
|
+
export class StrongBoxUnavailableException extends NativeObject {
|
|
753
|
+
/** Android API 28+ */
|
|
754
|
+
static new(ctx: TokamakContext, ): Promise<StrongBoxUnavailableException>;
|
|
755
|
+
/** Android API 28+ */
|
|
756
|
+
static new(ctx: TokamakContext, message: string | null): Promise<StrongBoxUnavailableException>;
|
|
757
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
758
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
759
|
+
["StrongBoxUnavailableException#<init>()V", []],
|
|
760
|
+
["StrongBoxUnavailableException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
761
|
+
]), args);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/** Android API 23+ */
|
|
766
|
+
export class UserNotAuthenticatedException extends NativeObject {
|
|
767
|
+
/** Android API 23+ */
|
|
768
|
+
static new(ctx: TokamakContext, ): Promise<UserNotAuthenticatedException>;
|
|
769
|
+
/** Android API 23+ */
|
|
770
|
+
static new(ctx: TokamakContext, message: string | null): Promise<UserNotAuthenticatedException>;
|
|
771
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
772
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
773
|
+
["UserNotAuthenticatedException#<init>()V", []],
|
|
774
|
+
["UserNotAuthenticatedException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
775
|
+
]), args);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/** Android API 28+ */
|
|
780
|
+
export class UserPresenceUnavailableException extends NativeObject {
|
|
781
|
+
/** Android API 28+ */
|
|
782
|
+
static new(ctx: TokamakContext, ): Promise<UserPresenceUnavailableException>;
|
|
783
|
+
/** Android API 28+ */
|
|
784
|
+
static new(ctx: TokamakContext, message: string | null): Promise<UserPresenceUnavailableException>;
|
|
785
|
+
static new(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
786
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
787
|
+
["UserPresenceUnavailableException#<init>()V", []],
|
|
788
|
+
["UserPresenceUnavailableException#<init>(Ljava/lang/String;)V", [["string", "null"]]],
|
|
789
|
+
]), args);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/** Android API 28+ */
|
|
794
|
+
export class WrappedKeyEntry extends NativeObject {
|
|
795
|
+
/** Android API 28+ */
|
|
796
|
+
getWrappedKeyBytes(): Promise<Uint8Array | null> {
|
|
797
|
+
return bindings.call(this, "WrappedKeyEntry#getWrappedKeyBytes()[B", []);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/** Android API 28+ */
|
|
801
|
+
getWrappingKeyAlias(): Promise<string | null> {
|
|
802
|
+
return bindings.call(this, "WrappedKeyEntry#getWrappingKeyAlias()Ljava/lang/String;", []);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/** Android API 28+ */
|
|
806
|
+
getTransformation(): Promise<string | null> {
|
|
807
|
+
return bindings.call(this, "WrappedKeyEntry#getTransformation()Ljava/lang/String;", []);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/** Android API 1+ */
|
|
812
|
+
export class KeyStore extends NativeObject {
|
|
813
|
+
/** Android API 1+ */
|
|
814
|
+
static getInstance(ctx: TokamakContext, type: string | null): Promise<KeyStore | null>;
|
|
815
|
+
/** Android API 1+ */
|
|
816
|
+
static getInstance(ctx: TokamakContext, type: string | null, provider: string | null): Promise<KeyStore | null>;
|
|
817
|
+
static getInstance(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
818
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
819
|
+
["KeyStore#getInstance(Ljava/lang/String;)Ljava/security/KeyStore;", [["string", "null"]]],
|
|
820
|
+
["KeyStore#getInstance(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyStore;", [["string", "null"], ["string", "null"]]],
|
|
821
|
+
]), args);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/** Android API 1+ */
|
|
825
|
+
static getDefaultType(ctx: TokamakContext): Promise<string | null> {
|
|
826
|
+
return bindings.call(ctx, "KeyStore#getDefaultType()Ljava/lang/String;", []);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/** Android API 1+ */
|
|
830
|
+
getType(): Promise<string | null> {
|
|
831
|
+
return bindings.call(this, "KeyStore#getType()Ljava/lang/String;", []);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/** Android API 1+ */
|
|
835
|
+
deleteEntry(alias: string | null): Promise<void> {
|
|
836
|
+
return bindings.call(this, "KeyStore#deleteEntry(Ljava/lang/String;)V", [alias]);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/** Android API 1+ */
|
|
840
|
+
containsAlias(alias: string | null): Promise<boolean> {
|
|
841
|
+
return bindings.call(this, "KeyStore#containsAlias(Ljava/lang/String;)Z", [alias]);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/** Android API 1+ */
|
|
845
|
+
size(): Promise<number> {
|
|
846
|
+
return bindings.call(this, "KeyStore#size()I", []);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/** Android API 1+ */
|
|
850
|
+
isKeyEntry(alias: string | null): Promise<boolean> {
|
|
851
|
+
return bindings.call(this, "KeyStore#isKeyEntry(Ljava/lang/String;)Z", [alias]);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/** Android API 1+ */
|
|
855
|
+
isCertificateEntry(alias: string | null): Promise<boolean> {
|
|
856
|
+
return bindings.call(this, "KeyStore#isCertificateEntry(Ljava/lang/String;)Z", [alias]);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/** Android API 1+ */
|
|
860
|
+
store(param: KeyStore$LoadStoreParameter | null): Promise<void> {
|
|
861
|
+
return bindings.call(this, "KeyStore#store(Ljava/security/KeyStore$LoadStoreParameter;)V", [param]);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/** Android API 1+ */
|
|
865
|
+
load(param: KeyStore$LoadStoreParameter | null): Promise<void> {
|
|
866
|
+
return bindings.call(this, "KeyStore#load(Ljava/security/KeyStore$LoadStoreParameter;)V", [param]);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/** Android API 1+ */
|
|
870
|
+
getEntry(alias: string | null, protParam: KeyStore$ProtectionParameter | null): Promise<KeyStore$Entry | null> {
|
|
871
|
+
return bindings.call(this, "KeyStore#getEntry(Ljava/lang/String;Ljava/security/KeyStore$ProtectionParameter;)Ljava/security/KeyStore$Entry;", [alias, protParam]);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/** Android API 1+ */
|
|
875
|
+
setEntry(alias: string | null, entry: KeyStore$Entry | null, protParam: KeyStore$ProtectionParameter | null): Promise<void> {
|
|
876
|
+
return bindings.call(this, "KeyStore#setEntry(Ljava/lang/String;Ljava/security/KeyStore$Entry;Ljava/security/KeyStore$ProtectionParameter;)V", [alias, entry, protParam]);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** Android API 1+ */
|
|
881
|
+
export class KeyStore$Builder extends NativeObject {
|
|
882
|
+
/** Android API 1+ */
|
|
883
|
+
getKeyStore(): Promise<KeyStore | null> {
|
|
884
|
+
return bindings.call(this, "KeyStore.Builder#getKeyStore()Ljava/security/KeyStore;", []);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/** Android API 1+ */
|
|
888
|
+
getProtectionParameter(alias: string | null): Promise<KeyStore$ProtectionParameter | null> {
|
|
889
|
+
return bindings.call(this, "KeyStore.Builder#getProtectionParameter(Ljava/lang/String;)Ljava/security/KeyStore$ProtectionParameter;", [alias]);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/** Android API 1+ */
|
|
893
|
+
static newInstance(ctx: TokamakContext, keyStore: KeyStore | null, protectionParameter: KeyStore$ProtectionParameter | null): Promise<KeyStore$Builder | null> {
|
|
894
|
+
return bindings.call(ctx, "KeyStore.Builder#newInstance(Ljava/security/KeyStore;Ljava/security/KeyStore$ProtectionParameter;)Ljava/security/KeyStore$Builder;", [keyStore, protectionParameter]);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/** Android API 1+ */
|
|
899
|
+
export class KeyStore$CallbackHandlerProtection extends NativeObject {
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/** Android API 1+ */
|
|
903
|
+
export class KeyStore$Entry extends NativeObject {
|
|
904
|
+
/** Android API 26+ */
|
|
905
|
+
getAttributes(): Promise<(KeyStore$Entry$Attribute | null)[] | null> {
|
|
906
|
+
return bindings.call(this, "KeyStore.Entry#getAttributes()Ljava/util/Set;", []);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/** Android API 26+ */
|
|
911
|
+
export class KeyStore$Entry$Attribute extends NativeObject {
|
|
912
|
+
/** Android API 26+ */
|
|
913
|
+
getName(): Promise<string | null> {
|
|
914
|
+
return bindings.call(this, "KeyStore.Entry.Attribute#getName()Ljava/lang/String;", []);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/** Android API 26+ */
|
|
918
|
+
getValue(): Promise<string | null> {
|
|
919
|
+
return bindings.call(this, "KeyStore.Entry.Attribute#getValue()Ljava/lang/String;", []);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/** Android API 1+ */
|
|
924
|
+
export class KeyStore$LoadStoreParameter extends NativeObject {
|
|
925
|
+
/** Android API 1+ */
|
|
926
|
+
getProtectionParameter(): Promise<KeyStore$ProtectionParameter | null> {
|
|
927
|
+
return bindings.call(this, "KeyStore.LoadStoreParameter#getProtectionParameter()Ljava/security/KeyStore$ProtectionParameter;", []);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/** Android API 1+ */
|
|
932
|
+
export class KeyStore$PasswordProtection extends NativeObject {
|
|
933
|
+
/** Android API 1+ */
|
|
934
|
+
static new(ctx: TokamakContext, password: string[] | null): Promise<KeyStore$PasswordProtection> {
|
|
935
|
+
return bindings.call(ctx, "KeyStore.PasswordProtection#<init>([C)V", [password]);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/** Android API 1+ */
|
|
939
|
+
getPassword(): Promise<string[] | null> {
|
|
940
|
+
return bindings.call(this, "KeyStore.PasswordProtection#getPassword()[C", []);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
/** Android API 1+ */
|
|
944
|
+
destroy(): Promise<void> {
|
|
945
|
+
return bindings.call(this, "KeyStore.PasswordProtection#destroy()V", []);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/** Android API 1+ */
|
|
949
|
+
isDestroyed(): Promise<boolean> {
|
|
950
|
+
return bindings.call(this, "KeyStore.PasswordProtection#isDestroyed()Z", []);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/** Android API 26+ */
|
|
954
|
+
getProtectionAlgorithm(): Promise<string | null> {
|
|
955
|
+
return bindings.call(this, "KeyStore.PasswordProtection#getProtectionAlgorithm()Ljava/lang/String;", []);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/** Android API 1+ */
|
|
960
|
+
export class KeyStore$PrivateKeyEntry extends NativeObject {
|
|
961
|
+
/** Android API 1+ */
|
|
962
|
+
getAttributes(): Promise<(KeyStore$Entry$Attribute | null)[] | null> {
|
|
963
|
+
return bindings.call(this, "KeyStore.PrivateKeyEntry#getAttributes()Ljava/util/Set;", []);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/** Android API 1+ */
|
|
967
|
+
toString(): Promise<string | null> {
|
|
968
|
+
return bindings.call(this, "KeyStore.PrivateKeyEntry#toString()Ljava/lang/String;", []);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/** Android API 1+ */
|
|
973
|
+
export class KeyStore$ProtectionParameter extends NativeObject {
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/** Android API 1+ */
|
|
977
|
+
export class KeyStore$SecretKeyEntry extends NativeObject {
|
|
978
|
+
/** Android API 1+ */
|
|
979
|
+
getAttributes(): Promise<(KeyStore$Entry$Attribute | null)[] | null> {
|
|
980
|
+
return bindings.call(this, "KeyStore.SecretKeyEntry#getAttributes()Ljava/util/Set;", []);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/** Android API 1+ */
|
|
984
|
+
toString(): Promise<string | null> {
|
|
985
|
+
return bindings.call(this, "KeyStore.SecretKeyEntry#toString()Ljava/lang/String;", []);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/** Android API 1+ */
|
|
990
|
+
export class KeyStore$TrustedCertificateEntry extends NativeObject {
|
|
991
|
+
/** Android API 1+ */
|
|
992
|
+
getAttributes(): Promise<(KeyStore$Entry$Attribute | null)[] | null> {
|
|
993
|
+
return bindings.call(this, "KeyStore.TrustedCertificateEntry#getAttributes()Ljava/util/Set;", []);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/** Android API 1+ */
|
|
997
|
+
toString(): Promise<string | null> {
|
|
998
|
+
return bindings.call(this, "KeyStore.TrustedCertificateEntry#toString()Ljava/lang/String;", []);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/** Android API 1+ */
|
|
1003
|
+
export class Cipher extends NativeObject {
|
|
1004
|
+
/** Android API 1+ */
|
|
1005
|
+
static readonly DECRYPT_MODE = 2;
|
|
1006
|
+
|
|
1007
|
+
/** Android API 1+ */
|
|
1008
|
+
static readonly ENCRYPT_MODE = 1;
|
|
1009
|
+
|
|
1010
|
+
/** Android API 1+ */
|
|
1011
|
+
static readonly PRIVATE_KEY = 2;
|
|
1012
|
+
|
|
1013
|
+
/** Android API 1+ */
|
|
1014
|
+
static readonly PUBLIC_KEY = 1;
|
|
1015
|
+
|
|
1016
|
+
/** Android API 1+ */
|
|
1017
|
+
static readonly SECRET_KEY = 3;
|
|
1018
|
+
|
|
1019
|
+
/** Android API 1+ */
|
|
1020
|
+
static readonly UNWRAP_MODE = 4;
|
|
1021
|
+
|
|
1022
|
+
/** Android API 1+ */
|
|
1023
|
+
static readonly WRAP_MODE = 3;
|
|
1024
|
+
|
|
1025
|
+
/** Android API 1+ */
|
|
1026
|
+
static getInstance(ctx: TokamakContext, transformation: string | null): Promise<Cipher | null>;
|
|
1027
|
+
/** Android API 1+ */
|
|
1028
|
+
static getInstance(ctx: TokamakContext, transformation: string | null, provider: string | null): Promise<Cipher | null>;
|
|
1029
|
+
static getInstance(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
1030
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
1031
|
+
["Cipher#getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;", [["string", "null"]]],
|
|
1032
|
+
["Cipher#getInstance(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/Cipher;", [["string", "null"], ["string", "null"]]],
|
|
1033
|
+
]), args);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
/** Android API 1+ */
|
|
1037
|
+
getAlgorithm(): Promise<string | null> {
|
|
1038
|
+
return bindings.call(this, "Cipher#getAlgorithm()Ljava/lang/String;", []);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/** Android API 1+ */
|
|
1042
|
+
getBlockSize(): Promise<number> {
|
|
1043
|
+
return bindings.call(this, "Cipher#getBlockSize()I", []);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/** Android API 1+ */
|
|
1047
|
+
getOutputSize(inputLen: number): Promise<number> {
|
|
1048
|
+
return bindings.call(this, "Cipher#getOutputSize(I)I", [inputLen]);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/** Android API 1+ */
|
|
1052
|
+
getIV(): Promise<Uint8Array | null> {
|
|
1053
|
+
return bindings.call(this, "Cipher#getIV()[B", []);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/** Android API 1+ */
|
|
1057
|
+
update(input: Uint8Array | null): Promise<Uint8Array | null>;
|
|
1058
|
+
/** Android API 1+ */
|
|
1059
|
+
update(input: Uint8Array | null, inputOffset: number, inputLen: number): Promise<Uint8Array | null>;
|
|
1060
|
+
/** Android API 1+ */
|
|
1061
|
+
update(input: Uint8Array | null, inputOffset: number, inputLen: number, output: Uint8Array | null): Promise<number>;
|
|
1062
|
+
/** Android API 1+ */
|
|
1063
|
+
update(input: Uint8Array | null, inputOffset: number, inputLen: number, output: Uint8Array | null, outputOffset: number): Promise<number>;
|
|
1064
|
+
update(...args: unknown[]): Promise<unknown> {
|
|
1065
|
+
return bindings.call(this, bindings.overload(args, [
|
|
1066
|
+
["Cipher#update([B)[B", [["bytes", "null"]]],
|
|
1067
|
+
["Cipher#update([BII)[B", [["bytes", "null"], ["number"], ["number"]]],
|
|
1068
|
+
["Cipher#update([BII[B)I", [["bytes", "null"], ["number"], ["number"], ["bytes", "null"]]],
|
|
1069
|
+
["Cipher#update([BII[BI)I", [["bytes", "null"], ["number"], ["number"], ["bytes", "null"], ["number"]]],
|
|
1070
|
+
]), args);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/** Android API 1+ */
|
|
1074
|
+
doFinal(): Promise<Uint8Array | null>;
|
|
1075
|
+
/** Android API 1+ */
|
|
1076
|
+
doFinal(output: Uint8Array | null, outputOffset: number): Promise<number>;
|
|
1077
|
+
/** Android API 1+ */
|
|
1078
|
+
doFinal(input: Uint8Array | null): Promise<Uint8Array | null>;
|
|
1079
|
+
/** Android API 1+ */
|
|
1080
|
+
doFinal(input: Uint8Array | null, inputOffset: number, inputLen: number): Promise<Uint8Array | null>;
|
|
1081
|
+
/** Android API 1+ */
|
|
1082
|
+
doFinal(input: Uint8Array | null, inputOffset: number, inputLen: number, output: Uint8Array | null): Promise<number>;
|
|
1083
|
+
/** Android API 1+ */
|
|
1084
|
+
doFinal(input: Uint8Array | null, inputOffset: number, inputLen: number, output: Uint8Array | null, outputOffset: number): Promise<number>;
|
|
1085
|
+
doFinal(...args: unknown[]): Promise<unknown> {
|
|
1086
|
+
return bindings.call(this, bindings.overload(args, [
|
|
1087
|
+
["Cipher#doFinal()[B", []],
|
|
1088
|
+
["Cipher#doFinal([BI)I", [["bytes", "null"], ["number"]]],
|
|
1089
|
+
["Cipher#doFinal([B)[B", [["bytes", "null"]]],
|
|
1090
|
+
["Cipher#doFinal([BII)[B", [["bytes", "null"], ["number"], ["number"]]],
|
|
1091
|
+
["Cipher#doFinal([BII[B)I", [["bytes", "null"], ["number"], ["number"], ["bytes", "null"]]],
|
|
1092
|
+
["Cipher#doFinal([BII[BI)I", [["bytes", "null"], ["number"], ["number"], ["bytes", "null"], ["number"]]],
|
|
1093
|
+
]), args);
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** Android API 1+ */
|
|
1097
|
+
static getMaxAllowedKeyLength(ctx: TokamakContext, transformation: string | null): Promise<number> {
|
|
1098
|
+
return bindings.call(ctx, "Cipher#getMaxAllowedKeyLength(Ljava/lang/String;)I", [transformation]);
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
/** Android API 19+ */
|
|
1102
|
+
updateAAD(src: Uint8Array | null): Promise<void>;
|
|
1103
|
+
/** Android API 19+ */
|
|
1104
|
+
updateAAD(src: Uint8Array | null, offset: number, len: number): Promise<void>;
|
|
1105
|
+
updateAAD(...args: unknown[]): Promise<unknown> {
|
|
1106
|
+
return bindings.call(this, bindings.overload(args, [
|
|
1107
|
+
["Cipher#updateAAD([B)V", [["bytes", "null"]]],
|
|
1108
|
+
["Cipher#updateAAD([BII)V", [["bytes", "null"], ["number"], ["number"]]],
|
|
1109
|
+
]), args);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
/** Android API 1+ */
|
|
1114
|
+
export class KeyGenerator extends NativeObject {
|
|
1115
|
+
/** Android API 1+ */
|
|
1116
|
+
getAlgorithm(): Promise<string | null> {
|
|
1117
|
+
return bindings.call(this, "KeyGenerator#getAlgorithm()Ljava/lang/String;", []);
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/** Android API 1+ */
|
|
1121
|
+
static getInstance(ctx: TokamakContext, algorithm: string | null): Promise<KeyGenerator | null>;
|
|
1122
|
+
/** Android API 1+ */
|
|
1123
|
+
static getInstance(ctx: TokamakContext, algorithm: string | null, provider: string | null): Promise<KeyGenerator | null>;
|
|
1124
|
+
static getInstance(ctx: TokamakContext, ...args: unknown[]): Promise<unknown> {
|
|
1125
|
+
return bindings.call(ctx, bindings.overload(args, [
|
|
1126
|
+
["KeyGenerator#getInstance(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;", [["string", "null"]]],
|
|
1127
|
+
["KeyGenerator#getInstance(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/KeyGenerator;", [["string", "null"], ["string", "null"]]],
|
|
1128
|
+
]), args);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/** Android API 1+ */
|
|
1132
|
+
init(keysize: number): Promise<void> {
|
|
1133
|
+
return bindings.call(this, "KeyGenerator#init(I)V", [keysize]);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
const classes: Classes = {
|
|
1138
|
+
"android.security.keystore.BackendBusyException": BackendBusyException,
|
|
1139
|
+
"android.security.keystore.KeyExpiredException": KeyExpiredException,
|
|
1140
|
+
"android.security.keystore.KeyGenParameterSpec": KeyGenParameterSpec,
|
|
1141
|
+
"android.security.keystore.KeyGenParameterSpec$Builder": KeyGenParameterSpec$Builder,
|
|
1142
|
+
"android.security.keystore.KeyInfo": KeyInfo,
|
|
1143
|
+
"android.security.keystore.KeyNotYetValidException": KeyNotYetValidException,
|
|
1144
|
+
"android.security.keystore.KeyPermanentlyInvalidatedException": KeyPermanentlyInvalidatedException,
|
|
1145
|
+
"android.security.keystore.KeyProperties": KeyProperties,
|
|
1146
|
+
"android.security.keystore.KeyProtection": KeyProtection,
|
|
1147
|
+
"android.security.keystore.KeyProtection$Builder": KeyProtection$Builder,
|
|
1148
|
+
"android.security.keystore.SecureKeyImportUnavailableException": SecureKeyImportUnavailableException,
|
|
1149
|
+
"android.security.keystore.StrongBoxUnavailableException": StrongBoxUnavailableException,
|
|
1150
|
+
"android.security.keystore.UserNotAuthenticatedException": UserNotAuthenticatedException,
|
|
1151
|
+
"android.security.keystore.UserPresenceUnavailableException": UserPresenceUnavailableException,
|
|
1152
|
+
"android.security.keystore.WrappedKeyEntry": WrappedKeyEntry,
|
|
1153
|
+
"java.security.KeyStore": KeyStore,
|
|
1154
|
+
"java.security.KeyStore$Builder": KeyStore$Builder,
|
|
1155
|
+
"java.security.KeyStore$CallbackHandlerProtection": KeyStore$CallbackHandlerProtection,
|
|
1156
|
+
"java.security.KeyStore$Entry": KeyStore$Entry,
|
|
1157
|
+
"java.security.KeyStore$Entry$Attribute": KeyStore$Entry$Attribute,
|
|
1158
|
+
"java.security.KeyStore$LoadStoreParameter": KeyStore$LoadStoreParameter,
|
|
1159
|
+
"java.security.KeyStore$PasswordProtection": KeyStore$PasswordProtection,
|
|
1160
|
+
"java.security.KeyStore$PrivateKeyEntry": KeyStore$PrivateKeyEntry,
|
|
1161
|
+
"java.security.KeyStore$ProtectionParameter": KeyStore$ProtectionParameter,
|
|
1162
|
+
"java.security.KeyStore$SecretKeyEntry": KeyStore$SecretKeyEntry,
|
|
1163
|
+
"java.security.KeyStore$TrustedCertificateEntry": KeyStore$TrustedCertificateEntry,
|
|
1164
|
+
"javax.crypto.Cipher": Cipher,
|
|
1165
|
+
"javax.crypto.KeyGenerator": KeyGenerator,
|
|
1166
|
+
};
|