2023-04-27 10:13:38 +03:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'models.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PinMetadataImpl _$$PinMetadataImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$PinMetadataImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
json['default_value'] as bool,
|
|
|
|
json['total_attempts'] as int,
|
|
|
|
json['attempts_remaining'] as int,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PinMetadataImplToJson(_$PinMetadataImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'default_value': instance.defaultValue,
|
|
|
|
'total_attempts': instance.totalAttempts,
|
|
|
|
'attempts_remaining': instance.attemptsRemaining,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$ManagementKeyMetadataImpl _$$ManagementKeyMetadataImplFromJson(
|
2023-04-27 10:13:38 +03:00
|
|
|
Map<String, dynamic> json) =>
|
2023-11-15 10:56:52 +03:00
|
|
|
_$ManagementKeyMetadataImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
$enumDecode(_$ManagementKeyTypeEnumMap, json['key_type']),
|
|
|
|
json['default_value'] as bool,
|
|
|
|
$enumDecode(_$TouchPolicyEnumMap, json['touch_policy']),
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$ManagementKeyMetadataImplToJson(
|
|
|
|
_$ManagementKeyMetadataImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'key_type': _$ManagementKeyTypeEnumMap[instance.keyType]!,
|
|
|
|
'default_value': instance.defaultValue,
|
|
|
|
'touch_policy': _$TouchPolicyEnumMap[instance.touchPolicy]!,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$ManagementKeyTypeEnumMap = {
|
|
|
|
ManagementKeyType.tdes: 3,
|
|
|
|
ManagementKeyType.aes128: 8,
|
|
|
|
ManagementKeyType.aes192: 10,
|
|
|
|
ManagementKeyType.aes256: 12,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$TouchPolicyEnumMap = {
|
|
|
|
TouchPolicy.dfault: 0,
|
|
|
|
TouchPolicy.never: 1,
|
|
|
|
TouchPolicy.always: 2,
|
|
|
|
TouchPolicy.cached: 3,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$SlotMetadataImpl _$$SlotMetadataImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$SlotMetadataImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
$enumDecode(_$KeyTypeEnumMap, json['key_type']),
|
|
|
|
$enumDecode(_$PinPolicyEnumMap, json['pin_policy']),
|
|
|
|
$enumDecode(_$TouchPolicyEnumMap, json['touch_policy']),
|
|
|
|
json['generated'] as bool,
|
2024-02-08 17:06:46 +03:00
|
|
|
json['public_key'] as String,
|
2023-04-27 10:13:38 +03:00
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$SlotMetadataImplToJson(_$SlotMetadataImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'key_type': _$KeyTypeEnumMap[instance.keyType]!,
|
|
|
|
'pin_policy': _$PinPolicyEnumMap[instance.pinPolicy]!,
|
|
|
|
'touch_policy': _$TouchPolicyEnumMap[instance.touchPolicy]!,
|
|
|
|
'generated': instance.generated,
|
2024-02-08 17:06:46 +03:00
|
|
|
'public_key': instance.publicKey,
|
2023-04-27 10:13:38 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
const _$KeyTypeEnumMap = {
|
|
|
|
KeyType.rsa1024: 6,
|
|
|
|
KeyType.rsa2048: 7,
|
2024-02-02 15:52:22 +03:00
|
|
|
KeyType.rsa3072: 5,
|
|
|
|
KeyType.rsa4096: 22,
|
2023-04-27 10:13:38 +03:00
|
|
|
KeyType.eccp256: 17,
|
|
|
|
KeyType.eccp384: 20,
|
2024-02-02 15:52:22 +03:00
|
|
|
KeyType.ed25519: 224,
|
|
|
|
KeyType.x25519: 225,
|
2023-04-27 10:13:38 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
const _$PinPolicyEnumMap = {
|
|
|
|
PinPolicy.dfault: 0,
|
|
|
|
PinPolicy.never: 1,
|
|
|
|
PinPolicy.once: 2,
|
|
|
|
PinPolicy.always: 3,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PivStateMetadataImpl _$$PivStateMetadataImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$PivStateMetadataImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
managementKeyMetadata: ManagementKeyMetadata.fromJson(
|
|
|
|
json['management_key_metadata'] as Map<String, dynamic>),
|
|
|
|
pinMetadata:
|
|
|
|
PinMetadata.fromJson(json['pin_metadata'] as Map<String, dynamic>),
|
|
|
|
pukMetadata:
|
|
|
|
PinMetadata.fromJson(json['puk_metadata'] as Map<String, dynamic>),
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PivStateMetadataImplToJson(
|
|
|
|
_$PivStateMetadataImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'management_key_metadata': instance.managementKeyMetadata,
|
|
|
|
'pin_metadata': instance.pinMetadata,
|
|
|
|
'puk_metadata': instance.pukMetadata,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PivStateImpl _$$PivStateImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$PivStateImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
version: Version.fromJson(json['version'] as List<dynamic>),
|
|
|
|
authenticated: json['authenticated'] as bool,
|
|
|
|
derivedKey: json['derived_key'] as bool,
|
|
|
|
storedKey: json['stored_key'] as bool,
|
|
|
|
pinAttempts: json['pin_attempts'] as int,
|
|
|
|
chuid: json['chuid'] as String?,
|
|
|
|
ccc: json['ccc'] as String?,
|
|
|
|
metadata: json['metadata'] == null
|
|
|
|
? null
|
|
|
|
: PivStateMetadata.fromJson(json['metadata'] as Map<String, dynamic>),
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PivStateImplToJson(_$PivStateImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'version': instance.version,
|
|
|
|
'authenticated': instance.authenticated,
|
|
|
|
'derived_key': instance.derivedKey,
|
|
|
|
'stored_key': instance.storedKey,
|
|
|
|
'pin_attempts': instance.pinAttempts,
|
|
|
|
'chuid': instance.chuid,
|
|
|
|
'ccc': instance.ccc,
|
|
|
|
'metadata': instance.metadata,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$CertInfoImpl _$$CertInfoImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$CertInfoImpl(
|
2024-02-07 16:48:51 +03:00
|
|
|
keyType: $enumDecodeNullable(_$KeyTypeEnumMap, json['key_type']),
|
2023-04-27 10:13:38 +03:00
|
|
|
subject: json['subject'] as String,
|
|
|
|
issuer: json['issuer'] as String,
|
|
|
|
serial: json['serial'] as String,
|
|
|
|
notValidBefore: json['not_valid_before'] as String,
|
|
|
|
notValidAfter: json['not_valid_after'] as String,
|
|
|
|
fingerprint: json['fingerprint'] as String,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$CertInfoImplToJson(_$CertInfoImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
2024-02-07 16:48:51 +03:00
|
|
|
'key_type': _$KeyTypeEnumMap[instance.keyType],
|
2023-04-27 10:13:38 +03:00
|
|
|
'subject': instance.subject,
|
|
|
|
'issuer': instance.issuer,
|
|
|
|
'serial': instance.serial,
|
|
|
|
'not_valid_before': instance.notValidBefore,
|
|
|
|
'not_valid_after': instance.notValidAfter,
|
|
|
|
'fingerprint': instance.fingerprint,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PivSlotImpl _$$PivSlotImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$PivSlotImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
slot: SlotId.fromJson(json['slot'] as int),
|
2024-02-07 16:48:51 +03:00
|
|
|
metadata: json['metadata'] == null
|
|
|
|
? null
|
|
|
|
: SlotMetadata.fromJson(json['metadata'] as Map<String, dynamic>),
|
2023-04-27 10:13:38 +03:00
|
|
|
certInfo: json['cert_info'] == null
|
|
|
|
? null
|
|
|
|
: CertInfo.fromJson(json['cert_info'] as Map<String, dynamic>),
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PivSlotImplToJson(_$PivSlotImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'slot': _$SlotIdEnumMap[instance.slot]!,
|
2024-02-07 16:48:51 +03:00
|
|
|
'metadata': instance.metadata,
|
2023-04-27 10:13:38 +03:00
|
|
|
'cert_info': instance.certInfo,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$SlotIdEnumMap = {
|
|
|
|
SlotId.authentication: 'authentication',
|
|
|
|
SlotId.signature: 'signature',
|
|
|
|
SlotId.keyManagement: 'keyManagement',
|
|
|
|
SlotId.cardAuth: 'cardAuth',
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$ExamineResultImpl _$$ExamineResultImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$ExamineResultImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
password: json['password'] as bool,
|
2023-08-23 16:53:30 +03:00
|
|
|
keyType: $enumDecodeNullable(_$KeyTypeEnumMap, json['key_type']),
|
|
|
|
certInfo: json['cert_info'] == null
|
|
|
|
? null
|
|
|
|
: CertInfo.fromJson(json['cert_info'] as Map<String, dynamic>),
|
2023-04-27 10:13:38 +03:00
|
|
|
$type: json['runtimeType'] as String?,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$ExamineResultImplToJson(_$ExamineResultImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'password': instance.password,
|
2023-08-23 16:53:30 +03:00
|
|
|
'key_type': _$KeyTypeEnumMap[instance.keyType],
|
|
|
|
'cert_info': instance.certInfo,
|
2023-04-27 10:13:38 +03:00
|
|
|
'runtimeType': instance.$type,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$InvalidPasswordImpl _$$InvalidPasswordImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$InvalidPasswordImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
$type: json['runtimeType'] as String?,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$InvalidPasswordImplToJson(
|
|
|
|
_$InvalidPasswordImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'runtimeType': instance.$type,
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PivGenerateResultImpl _$$PivGenerateResultImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$PivGenerateResultImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
generateType: $enumDecode(_$GenerateTypeEnumMap, json['generate_type']),
|
|
|
|
publicKey: json['public_key'] as String,
|
2024-02-07 16:48:51 +03:00
|
|
|
result: json['result'] as String?,
|
2023-04-27 10:13:38 +03:00
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PivGenerateResultImplToJson(
|
|
|
|
_$PivGenerateResultImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'generate_type': _$GenerateTypeEnumMap[instance.generateType]!,
|
|
|
|
'public_key': instance.publicKey,
|
|
|
|
'result': instance.result,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$GenerateTypeEnumMap = {
|
2024-02-07 16:48:51 +03:00
|
|
|
GenerateType.publicKey: 'publicKey',
|
2023-04-27 10:13:38 +03:00
|
|
|
GenerateType.certificate: 'certificate',
|
|
|
|
GenerateType.csr: 'csr',
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$PivImportResultImpl _$$PivImportResultImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$PivImportResultImpl(
|
2023-04-27 10:13:38 +03:00
|
|
|
metadata: json['metadata'] == null
|
|
|
|
? null
|
|
|
|
: SlotMetadata.fromJson(json['metadata'] as Map<String, dynamic>),
|
|
|
|
publicKey: json['public_key'] as String?,
|
|
|
|
certificate: json['certificate'] as String?,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$PivImportResultImplToJson(
|
|
|
|
_$PivImportResultImpl instance) =>
|
2023-04-27 10:13:38 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'metadata': instance.metadata,
|
|
|
|
'public_key': instance.publicKey,
|
|
|
|
'certificate': instance.certificate,
|
|
|
|
};
|