Skip to content

Commit 36fe873

Browse files
authored
chore(jca): add IvParameterSpec JNI binding (#301)
* chore(jca): add IvParameterSpec binding config * chore(jca): regenerate JNI bindings
1 parent c59eb72 commit 36fe873

2 files changed

Lines changed: 192 additions & 0 deletions

File tree

lib/src/third_party/jca/generated_bindings.dart

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4335,6 +4335,197 @@ final class $GCMParameterSpec$Type$ extends jni$_.JType<GCMParameterSpec> {
43354335
}
43364336
}
43374337

4338+
/// from: `javax.crypto.spec.IvParameterSpec`
4339+
class IvParameterSpec extends jni$_.JObject {
4340+
@jni$_.internal
4341+
@core$_.override
4342+
final jni$_.JType<IvParameterSpec> $type;
4343+
4344+
@jni$_.internal
4345+
IvParameterSpec.fromReference(jni$_.JReference reference)
4346+
: $type = type,
4347+
super.fromReference(reference);
4348+
4349+
static final _class = jni$_.JClass.forName(
4350+
r'javax/crypto/spec/IvParameterSpec',
4351+
);
4352+
4353+
/// The type which includes information such as the signature of this class.
4354+
static const jni$_.JType<IvParameterSpec?> nullableType =
4355+
$IvParameterSpec$NullableType$();
4356+
4357+
/// The type which includes information such as the signature of this class.
4358+
static const jni$_.JType<IvParameterSpec> type = $IvParameterSpec$Type$();
4359+
static final _id_new$ = _class.constructorId(r'([B)V');
4360+
4361+
static final _new$ =
4362+
jni$_.ProtectedJniExtensions.lookup<
4363+
jni$_.NativeFunction<
4364+
jni$_.JniResult Function(
4365+
jni$_.Pointer<jni$_.Void>,
4366+
jni$_.JMethodIDPtr,
4367+
jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>,
4368+
)
4369+
>
4370+
>('globalEnv_NewObject')
4371+
.asFunction<
4372+
jni$_.JniResult Function(
4373+
jni$_.Pointer<jni$_.Void>,
4374+
jni$_.JMethodIDPtr,
4375+
jni$_.Pointer<jni$_.Void>,
4376+
)
4377+
>();
4378+
4379+
/// from: `public void <init>(byte[] bs)`
4380+
/// The returned object must be released after use, by calling the [release] method.
4381+
factory IvParameterSpec(jni$_.JByteArray? bs) {
4382+
final _$bs = bs?.reference ?? jni$_.jNullReference;
4383+
return IvParameterSpec.fromReference(
4384+
_new$(
4385+
_class.reference.pointer,
4386+
_id_new$ as jni$_.JMethodIDPtr,
4387+
_$bs.pointer,
4388+
).reference,
4389+
);
4390+
}
4391+
4392+
static final _id_new$1 = _class.constructorId(r'([BII)V');
4393+
4394+
static final _new$1 =
4395+
jni$_.ProtectedJniExtensions.lookup<
4396+
jni$_.NativeFunction<
4397+
jni$_.JniResult Function(
4398+
jni$_.Pointer<jni$_.Void>,
4399+
jni$_.JMethodIDPtr,
4400+
jni$_.VarArgs<
4401+
(jni$_.Pointer<jni$_.Void>, jni$_.Int32, jni$_.Int32)
4402+
>,
4403+
)
4404+
>
4405+
>('globalEnv_NewObject')
4406+
.asFunction<
4407+
jni$_.JniResult Function(
4408+
jni$_.Pointer<jni$_.Void>,
4409+
jni$_.JMethodIDPtr,
4410+
jni$_.Pointer<jni$_.Void>,
4411+
int,
4412+
int,
4413+
)
4414+
>();
4415+
4416+
/// from: `public void <init>(byte[] bs, int i, int i1)`
4417+
/// The returned object must be released after use, by calling the [release] method.
4418+
factory IvParameterSpec.new$1(jni$_.JByteArray? bs, int i, int i1) {
4419+
final _$bs = bs?.reference ?? jni$_.jNullReference;
4420+
return IvParameterSpec.fromReference(
4421+
_new$1(
4422+
_class.reference.pointer,
4423+
_id_new$1 as jni$_.JMethodIDPtr,
4424+
_$bs.pointer,
4425+
i,
4426+
i1,
4427+
).reference,
4428+
);
4429+
}
4430+
4431+
static final _id_getIV = _class.instanceMethodId(r'getIV', r'()[B');
4432+
4433+
static final _getIV =
4434+
jni$_.ProtectedJniExtensions.lookup<
4435+
jni$_.NativeFunction<
4436+
jni$_.JniResult Function(
4437+
jni$_.Pointer<jni$_.Void>,
4438+
jni$_.JMethodIDPtr,
4439+
)
4440+
>
4441+
>('globalEnv_CallObjectMethod')
4442+
.asFunction<
4443+
jni$_.JniResult Function(
4444+
jni$_.Pointer<jni$_.Void>,
4445+
jni$_.JMethodIDPtr,
4446+
)
4447+
>();
4448+
4449+
/// from: `public byte[] getIV()`
4450+
/// The returned object must be released after use, by calling the [release] method.
4451+
jni$_.JByteArray? getIV() {
4452+
return _getIV(
4453+
reference.pointer,
4454+
_id_getIV as jni$_.JMethodIDPtr,
4455+
).object<jni$_.JByteArray?>(const jni$_.$JByteArray$NullableType$());
4456+
}
4457+
}
4458+
4459+
final class $IvParameterSpec$NullableType$
4460+
extends jni$_.JType<IvParameterSpec?> {
4461+
@jni$_.internal
4462+
const $IvParameterSpec$NullableType$();
4463+
4464+
@jni$_.internal
4465+
@core$_.override
4466+
String get signature => r'Ljavax/crypto/spec/IvParameterSpec;';
4467+
4468+
@jni$_.internal
4469+
@core$_.override
4470+
IvParameterSpec? fromReference(jni$_.JReference reference) =>
4471+
reference.isNull ? null : IvParameterSpec.fromReference(reference);
4472+
@jni$_.internal
4473+
@core$_.override
4474+
jni$_.JType get superType => const jni$_.$JObject$NullableType$();
4475+
4476+
@jni$_.internal
4477+
@core$_.override
4478+
jni$_.JType<IvParameterSpec?> get nullableType => this;
4479+
4480+
@jni$_.internal
4481+
@core$_.override
4482+
final superCount = 1;
4483+
4484+
@core$_.override
4485+
int get hashCode => ($IvParameterSpec$NullableType$).hashCode;
4486+
4487+
@core$_.override
4488+
bool operator ==(Object other) {
4489+
return other.runtimeType == ($IvParameterSpec$NullableType$) &&
4490+
other is $IvParameterSpec$NullableType$;
4491+
}
4492+
}
4493+
4494+
final class $IvParameterSpec$Type$ extends jni$_.JType<IvParameterSpec> {
4495+
@jni$_.internal
4496+
const $IvParameterSpec$Type$();
4497+
4498+
@jni$_.internal
4499+
@core$_.override
4500+
String get signature => r'Ljavax/crypto/spec/IvParameterSpec;';
4501+
4502+
@jni$_.internal
4503+
@core$_.override
4504+
IvParameterSpec fromReference(jni$_.JReference reference) =>
4505+
IvParameterSpec.fromReference(reference);
4506+
@jni$_.internal
4507+
@core$_.override
4508+
jni$_.JType get superType => const jni$_.$JObject$NullableType$();
4509+
4510+
@jni$_.internal
4511+
@core$_.override
4512+
jni$_.JType<IvParameterSpec?> get nullableType =>
4513+
const $IvParameterSpec$NullableType$();
4514+
4515+
@jni$_.internal
4516+
@core$_.override
4517+
final superCount = 1;
4518+
4519+
@core$_.override
4520+
int get hashCode => ($IvParameterSpec$Type$).hashCode;
4521+
4522+
@core$_.override
4523+
bool operator ==(Object other) {
4524+
return other.runtimeType == ($IvParameterSpec$Type$) &&
4525+
other is $IvParameterSpec$Type$;
4526+
}
4527+
}
4528+
43384529
/// from: `javax.crypto.spec.SecretKeySpec`
43394530
class SecretKeySpec extends jni$_.JObject {
43404531
@jni$_.internal

lib/src/third_party/jca/jnigen.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ classes:
3232
- javax.crypto.KeyGenerator
3333
- javax.crypto.Mac
3434
- javax.crypto.spec.GCMParameterSpec
35+
- javax.crypto.spec.IvParameterSpec
3536
- javax.crypto.spec.SecretKeySpec

0 commit comments

Comments
 (0)