From 2ee3e666dd895677282b4f681815307d71e5b63e Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Sat, 15 Feb 2020 08:07:15 +0100 Subject: [PATCH] first version of argon2 interop for android,ios --- .gitignore | 3 + .idea/codeStyles/Project.xml | 116 ++++ .idea/inspectionProfiles/Project_Default.xml | 14 + .idea/libraries/Flutter_Plugins.xml | 9 + .idea/misc.xml | 4 + .idea/vcs.xml | 6 + .idea/workspace.xml | 382 ++++++++++- android/CMakeLists.txt | 19 + android/build.gradle | 9 + argon2_ffi.iml | 3 +- example/ios/Podfile.lock | 22 + example/ios/Runner.xcodeproj/project.pbxproj | 66 ++ .../contents.xcworkspacedata | 3 + example/lib/main.dart | 45 +- example/pubspec.lock | 9 +- ios/Classes/argon2_ffi.c | 90 +++ ios/Classes/argon2src/README.txt | 3 + ios/Classes/argon2src/argon2.c | 452 ++++++++++++ ios/Classes/argon2src/argon2.h | 437 ++++++++++++ ios/Classes/argon2src/blake2/blake2-impl.h | 156 +++++ ios/Classes/argon2src/blake2/blake2.h | 89 +++ ios/Classes/argon2src/blake2/blake2b.c | 390 +++++++++++ .../argon2src/blake2/blamka-round-opt.h | 471 +++++++++++++ .../argon2src/blake2/blamka-round-ref.h | 56 ++ ios/Classes/argon2src/core.c | 648 ++++++++++++++++++ ios/Classes/argon2src/core.h | 228 ++++++ ios/Classes/argon2src/encoding.c | 463 +++++++++++++ ios/Classes/argon2src/encoding.h | 57 ++ ios/Classes/argon2src/genkat.c | 207 ++++++ ios/Classes/argon2src/genkat.h | 51 ++ ios/Classes/argon2src/ref.c | 194 ++++++ ios/Classes/argon2src/thread.c | 57 ++ ios/Classes/argon2src/thread.h | 67 ++ ios/argon2_ffi.podspec | 2 +- lib/argon2_ffi.dart | 28 +- pubspec.lock | 9 +- pubspec.yaml | 2 + test/argon2_ffi_test.dart | 5 - 38 files changed, 4819 insertions(+), 53 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/libraries/Flutter_Plugins.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/vcs.xml create mode 100644 android/CMakeLists.txt create mode 100644 example/ios/Podfile.lock create mode 100644 ios/Classes/argon2_ffi.c create mode 100644 ios/Classes/argon2src/README.txt create mode 100644 ios/Classes/argon2src/argon2.c create mode 100644 ios/Classes/argon2src/argon2.h create mode 100644 ios/Classes/argon2src/blake2/blake2-impl.h create mode 100644 ios/Classes/argon2src/blake2/blake2.h create mode 100644 ios/Classes/argon2src/blake2/blake2b.c create mode 100644 ios/Classes/argon2src/blake2/blamka-round-opt.h create mode 100644 ios/Classes/argon2src/blake2/blamka-round-ref.h create mode 100644 ios/Classes/argon2src/core.c create mode 100644 ios/Classes/argon2src/core.h create mode 100644 ios/Classes/argon2src/encoding.c create mode 100644 ios/Classes/argon2src/encoding.h create mode 100644 ios/Classes/argon2src/genkat.c create mode 100644 ios/Classes/argon2src/genkat.h create mode 100644 ios/Classes/argon2src/ref.c create mode 100644 ios/Classes/argon2src/thread.c create mode 100644 ios/Classes/argon2src/thread.h diff --git a/.gitignore b/.gitignore index e9dc58d..060fc59 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ .pub/ build/ + +android/.cxx + diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..5c09ca9 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml new file mode 100644 index 0000000..53449da --- /dev/null +++ b/.idea/libraries/Flutter_Plugins.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c51e9c3 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 620ef2c..e956857 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,45 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + argon2_ffi + Plat + argon2i_hash_raw + main + + + + + + + + + + + -