Skip to content

Commit

Permalink
ISO 9797 Alg 3 Pad 2 implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
xclud committed Jun 5, 2024
1 parent 8112670 commit 95fee17
Show file tree
Hide file tree
Showing 21 changed files with 1,824 additions and 293 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.2

* ISO 9797 Alg 3 Pad 2 implemented.

## 0.3.1

* Added doc comments to improve package score.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2022 Mahdi K. Fard
Copyright (c) 2018-2024 Mahdi K. Fard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
49 changes: 46 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
include: package:lints/recommended.yaml

analyzer:
exclude:
- "lib/**/generated/**"
language:
strict-raw-types: false
errors:
always_declare_return_types: error
always_specify_types: error
always_use_package_imports: error
annotate_overrides: error
argument_type_not_assignable: error
avoid_function_literals_in_foreach_calls: error
avoid_renaming_method_parameters: error
avoid_types_on_closure_parameters: error
avoid_unnecessary_containers: error
await_only_futures: error
curly_braces_in_flow_control_structures: error
dead_code: error
duplicate_import: error
file_names: error
invalid_assignment: error
missing_return: error
prefer_const_constructors: error
prefer_const_constructors_in_immutables: error
prefer_const_declarations: error
prefer_collection_literals: error
prefer_contains: error
prefer_const_literals_to_create_immutables: error
prefer_final_fields: error
prefer_single_quotes: error
public_member_api_docs: error
sized_box_for_whitespace: error
sort_constructors_first: error
sort_unnamed_constructors_first: error
use_function_type_syntax_for_parameters: error
use_key_in_widget_constructors: error
unnecessary_import: error
unnecessary_string_interpolations: error
unnecessary_this: error
unused_import: error
linter:
rules:
avoid_print: false # Uncomment to disable the `avoid_print` rule
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
always_use_package_imports: false
avoid_print: false
prefer_single_quotes: true
public_member_api_docs: true
sort_constructors_first: true
sort_unnamed_constructors_first: true
3 changes: 3 additions & 0 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

#include "generated_plugin_registrant.h"

#include <flutter_libserialport/flutter_libserialport_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
FlutterLibserialportPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterLibserialportPlugin"));
}
9 changes: 9 additions & 0 deletions example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
flutter_libserialport
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand All @@ -13,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
22 changes: 21 additions & 1 deletion lib/pos.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
/// Dart Implementation of the ISO-8583 banking protocol for Point of Sale (POS) Devices.
library pos;

export 'src/message.dart';
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';

import 'package:convert/convert.dart';
import 'package:dart_des/dart_des.dart';

import 'src/des/constants.dart';
import 'src/des/utils.dart';

part 'src/bitmap.dart';
part 'src/des_helper.dart';
part 'src/des/des.dart';
part 'src/des/engine.dart';
part 'src/field.dart';
part 'src/fields.dart';
part 'src/iso9797.dart';
part 'src/mac.dart';
part 'src/message.dart';
part 'src/parser.dart';
part 'src/private.dart';
8 changes: 8 additions & 0 deletions lib/src/bitmap.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
part of '../pos.dart';

Uint8List _getBytes(int i) {
final n = ByteData(8);
n.setUint64(0, i);

return Uint8List.fromList(n.buffer.asUint8List());
}
Loading

0 comments on commit 95fee17

Please sign in to comment.