@oiti/rn-liveness3d 0.1.1
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/LICENSE +20 -0
- package/README.md +31 -0
- package/android/build.gradle +85 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/oiti/rnliveness3d/RnLiveness3dModule.kt +25 -0
- package/android/src/main/java/com/oiti/rnliveness3d/RnLiveness3dPackage.kt +17 -0
- package/ios/Podfile +14 -0
- package/ios/Podfile.lock +21 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/Info.plist +42 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Assets.car +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptcha +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +650 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha.h +19 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Info.plist +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftinterface +2187 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftinterface +2187 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/module.modulemap +11 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/_CodeSignature/CodeResources +1084 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/animation_loading.gif +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Assets.car +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptcha +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +974 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha.h +19 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Info.plist +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2187 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftinterface +2187 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2187 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/module.modulemap +11 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/_CodeSignature/CodeResources +582 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/animation_loading.gif +0 -0
- package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework.zip +0 -0
- package/ios/Pods/FaceCaptcha/LICENSE +1 -0
- package/ios/Pods/FaceCaptcha/README.md +98 -0
- package/ios/Pods/Manifest.lock +21 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/Info.plist +42 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Assets.car +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/FaceTecSDK +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/GenericGuidanceContentLayout.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +1894 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +92 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecSDK.h +16 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Info.plist +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Modules/module.modulemap +6 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/ReadyScreenGuidanceContentLayout.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/RetryScreenGuidanceContentLayout.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/SharedGuidanceLayout.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/9Uo-4b-JiE-view-Ae0-rb-UqS.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/CJ6-MX-bJp-view-8JL-Rc-0g1.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceScanViewController.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecAdditionalReviewViewController.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecOCRConfirmationViewController.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDCaptureViewController.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDSelectionViewController.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Info.plist +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Pyw-6G-JSY-view-Zue-Eo-Q2U.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/alz-Ia-X3d-view-IKu-EI-Hug.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/l2Q-cc-kD8-view-UUy-6c-meu.nib +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/attributions.txt +137 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/1f5b84f51ce0fcfbb76e904b7bcaa7560f601e1394a0b29367a09385312287eb +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/2b075ac1a6132b5b8a4c9ef0ba6b0cd84db7838aca9a000e50d907f40770a4ab +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/4c4774668f9b9333977fc891e7695420a0b4c27cc2c1cd3920ce9e0870e3c0e8 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/59cc2a9af81aaca2376702c2490650f4da2775fa673274db98aad41b7ef101c0 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/5b63e98b991aedabb60665503384f30bffd939decf9433883b30b78011ee501a +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/66388dc76dc16bc6b76b682edd218a575bf45b9b +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/6b3133f0f39ff89a2a169d61176ee17cafacc5e288f334e2b64ee82892d11ccd +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/9077d16225f9314163ef1e7db6fc7d4088bb903d134bd95f23d5591ca4dfbfca +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/Ys4TQh4aewlf1CpyzWLi +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/a74f2afb9d20f2375ccbd14e67c094b85c89ceb608f7cf8ae04f3f646a6c5672 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b501893e75f62ee1707643e35b21109927b07ed5b202321c961b424cbc2e4695 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b82962a4847bcf6d1bf89ea7543f83e184a1df7c4e7e3c343dd3e3e17cb9a645 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/dbd7a353f0130bb983d6ba05917e9be991d70e8f028df4b74e30bc6497ef7f71 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/f2.xml +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/fd6d368a5658496536e2bfae170d1b823a3629b242cafc09784bfba4e56d8c80 +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/marker +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/vu0ilin6we3lrzo5f83f7qs2jul4aq7v4aoynrmch8zfvpi8ezrfyafa4t0fx87l +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/en.lproj/FaceTec.strings +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/strip-unused-architectures-from-target.sh +62 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/FaceTecSDK +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +1894 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +92 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecSDK.h +16 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Info.plist +0 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Modules/module.modulemap +6 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/_CodeSignature/CodeResources +162 -0
- package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework.zip +0 -0
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +661 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/catelli.xcuserdatad/xcschemes/FaceCaptcha.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/catelli.xcuserdatad/xcschemes/OILiveness3D_FT.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/catelli.xcuserdatad/xcschemes/Pods-RnLiveness3d.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/catelli.xcuserdatad/xcschemes/xcschememanagement.plist +32 -0
- package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha-xcframeworks.sh +121 -0
- package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.debug.xcconfig +15 -0
- package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.release.xcconfig +15 -0
- package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT-xcframeworks.sh +121 -0
- package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.debug.xcconfig +13 -0
- package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.release.xcconfig +13 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-Info.plist +26 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.markdown +8 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.plist +40 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-dummy.m +5 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-umbrella.h +16 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.debug.xcconfig +14 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.modulemap +6 -0
- package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.release.xcconfig +14 -0
- package/ios/RnLiveness3d-Bridging-Header.h +11 -0
- package/ios/RnLiveness3d.m +14 -0
- package/ios/RnLiveness3d.swift +38 -0
- package/ios/RnLiveness3d.xcodeproj/project.pbxproj +334 -0
- package/ios/RnLiveness3d.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
- package/ios/RnLiveness3d.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RnLiveness3d.xcodeproj/project.xcworkspace/xcuserdata/catelli.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RnLiveness3d.xcodeproj/xcuserdata/catelli.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/RnLiveness3d.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/RnLiveness3d.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RnLiveness3d.xcworkspace/xcuserdata/catelli.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/oiti-rn-liveness3d.podspec +36 -0
- package/package.json +941 -0
- package/src/index.tsx +22 -0
|
@@ -0,0 +1,2187 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.6.1 effective-4.2 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -O -module-name FaceCaptcha
|
|
4
|
+
import AVFoundation
|
|
5
|
+
import CallKit
|
|
6
|
+
import Combine
|
|
7
|
+
import CoreGraphics
|
|
8
|
+
import CoreTelephony
|
|
9
|
+
import Darwin
|
|
10
|
+
@_exported import FaceCaptcha
|
|
11
|
+
import Foundation
|
|
12
|
+
import Network
|
|
13
|
+
import Swift
|
|
14
|
+
import SystemConfiguration
|
|
15
|
+
import UIKit.UIButton
|
|
16
|
+
import UIKit.UIImage
|
|
17
|
+
import UIKit
|
|
18
|
+
import UIKit.UIView
|
|
19
|
+
import _Concurrency
|
|
20
|
+
public enum DocumentscopyFocusIndicator {
|
|
21
|
+
case frontIndicator
|
|
22
|
+
case backIndicator
|
|
23
|
+
public static func == (a: FaceCaptcha.DocumentscopyFocusIndicator, b: FaceCaptcha.DocumentscopyFocusIndicator) -> Swift.Bool
|
|
24
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
25
|
+
public var hashValue: Swift.Int {
|
|
26
|
+
get
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
extension FaceCaptcha.AES : FaceCaptcha.Cryptors {
|
|
30
|
+
@inlinable final public func makeEncryptor() throws -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable {
|
|
31
|
+
let blockSize = blockMode.customBlockSize ?? AES.blockSize
|
|
32
|
+
let worker = try blockMode.worker(blockSize: blockSize, cipherOperation: encrypt, encryptionOperation: encrypt)
|
|
33
|
+
if worker is StreamModeWorker {
|
|
34
|
+
return try StreamEncryptor(blockSize: blockSize, padding: padding, worker)
|
|
35
|
+
}
|
|
36
|
+
return try BlockEncryptor(blockSize: blockSize, padding: padding, worker)
|
|
37
|
+
}
|
|
38
|
+
@inlinable final public func makeDecryptor() throws -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable {
|
|
39
|
+
let blockSize = blockMode.customBlockSize ?? AES.blockSize
|
|
40
|
+
let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt
|
|
41
|
+
let worker = try blockMode.worker(blockSize: blockSize, cipherOperation: cipherOperation, encryptionOperation: encrypt)
|
|
42
|
+
if worker is StreamModeWorker {
|
|
43
|
+
return try StreamDecryptor(blockSize: blockSize, padding: padding, worker)
|
|
44
|
+
}
|
|
45
|
+
return try BlockDecryptor(blockSize: blockSize, padding: padding, worker)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
extension UIKit.UIImage {
|
|
49
|
+
public func cropToRect(rect: CoreGraphics.CGRect) -> UIKit.UIImage
|
|
50
|
+
}
|
|
51
|
+
public protocol FaceCaptchaDelegate : AnyObject {
|
|
52
|
+
func handleFaceCaptchaValidation(validateModel: FaceCaptcha.FCValidCaptchaModel)
|
|
53
|
+
func handleFaceCaptchaError(error: FaceCaptcha.FaceCaptchaError)
|
|
54
|
+
func handleFaceCaptchaCanceled()
|
|
55
|
+
}
|
|
56
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor(unsafe) public class FaceCaptchaViewController : UIKit.UIViewController {
|
|
57
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public var shouldAutorotate: Swift.Bool {
|
|
58
|
+
@_Concurrency.MainActor(unsafe) @objc get
|
|
59
|
+
}
|
|
60
|
+
@_Concurrency.MainActor(unsafe) convenience public init(appKey: Swift.String, baseURL: Swift.String, delegate: FaceCaptcha.FaceCaptchaDelegate, cameraOverlay: UIKit.UIImage? = nil, customView: FaceCaptcha.FaceCaptchaView? = nil)
|
|
61
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func loadView()
|
|
62
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func viewDidLoad()
|
|
63
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
64
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
65
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public init(nibName nibNameOrNil: Swift.String?, bundle nibBundleOrNil: Foundation.Bundle?)
|
|
66
|
+
@_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
67
|
+
@objc deinit
|
|
68
|
+
}
|
|
69
|
+
extension FaceCaptcha.FaceCaptchaViewController : AVFoundation.AVCapturePhotoCaptureDelegate {
|
|
70
|
+
@available(iOS 11.0, *)
|
|
71
|
+
@_Concurrency.MainActor(unsafe) @objc dynamic public func photoOutput(_ output: AVFoundation.AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVFoundation.AVCapturePhoto, error: Swift.Error?)
|
|
72
|
+
@_Concurrency.MainActor(unsafe) @objc dynamic public func photoOutput(_ output: AVFoundation.AVCapturePhotoOutput, didFinishProcessingPhoto photoSampleBuffer: CoreMedia.CMSampleBuffer?, previewPhoto previewPhotoSampleBuffer: CoreMedia.CMSampleBuffer?, resolvedSettings: AVFoundation.AVCaptureResolvedPhotoSettings, bracketSettings: AVFoundation.AVCaptureBracketedStillImageSettings?, error: Swift.Error?)
|
|
73
|
+
}
|
|
74
|
+
@_inheritsConvenienceInitializers final public class CBCMAC : FaceCaptcha.CMAC {
|
|
75
|
+
override final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
76
|
+
override public init(key: Swift.Array<Swift.UInt8>) throws
|
|
77
|
+
@objc deinit
|
|
78
|
+
}
|
|
79
|
+
final public class SHA2 {
|
|
80
|
+
@usableFromInline
|
|
81
|
+
final internal let variant: FaceCaptcha.SHA2.Variant
|
|
82
|
+
@usableFromInline
|
|
83
|
+
final internal let size: Swift.Int
|
|
84
|
+
@usableFromInline
|
|
85
|
+
final internal let blockSize: Swift.Int
|
|
86
|
+
@usableFromInline
|
|
87
|
+
final internal let digestLength: Swift.Int
|
|
88
|
+
@usableFromInline
|
|
89
|
+
final internal var accumulated: [Swift.UInt8]
|
|
90
|
+
@usableFromInline
|
|
91
|
+
final internal var processedBytesTotalCount: Swift.Int
|
|
92
|
+
@usableFromInline
|
|
93
|
+
final internal var accumulatedHash32: [Swift.UInt32]
|
|
94
|
+
@usableFromInline
|
|
95
|
+
final internal var accumulatedHash64: [Swift.UInt64]
|
|
96
|
+
public enum Variant : Swift.RawRepresentable {
|
|
97
|
+
case sha224, sha256, sha384, sha512
|
|
98
|
+
public var digestLength: Swift.Int {
|
|
99
|
+
get
|
|
100
|
+
}
|
|
101
|
+
public var blockSize: Swift.Int {
|
|
102
|
+
get
|
|
103
|
+
}
|
|
104
|
+
public typealias RawValue = Swift.Int
|
|
105
|
+
public var rawValue: FaceCaptcha.SHA2.Variant.RawValue {
|
|
106
|
+
get
|
|
107
|
+
}
|
|
108
|
+
public init?(rawValue: FaceCaptcha.SHA2.Variant.RawValue)
|
|
109
|
+
@usableFromInline
|
|
110
|
+
internal var h: Swift.Array<Swift.UInt64> {
|
|
111
|
+
get
|
|
112
|
+
}
|
|
113
|
+
@usableFromInline
|
|
114
|
+
internal var finalLength: Swift.Int {
|
|
115
|
+
get
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
public init(variant: FaceCaptcha.SHA2.Variant)
|
|
119
|
+
@inlinable final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8> {
|
|
120
|
+
do {
|
|
121
|
+
return try update(withBytes: bytes.slice, isLast: true)
|
|
122
|
+
} catch {
|
|
123
|
+
return []
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
@usableFromInline
|
|
127
|
+
final internal func process64(block chunk: Swift.ArraySlice<Swift.UInt8>, currentHash hh: inout Swift.Array<Swift.UInt64>)
|
|
128
|
+
@usableFromInline
|
|
129
|
+
final internal func process32(block chunk: Swift.ArraySlice<Swift.UInt8>, currentHash hh: inout Swift.Array<Swift.UInt32>)
|
|
130
|
+
@objc deinit
|
|
131
|
+
}
|
|
132
|
+
extension FaceCaptcha.SHA2 : FaceCaptcha.Updatable {
|
|
133
|
+
@inlinable final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
134
|
+
self.accumulated += bytes
|
|
135
|
+
|
|
136
|
+
if isLast {
|
|
137
|
+
let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8
|
|
138
|
+
let lengthBytes = lengthInBits.bytes(totalBytes: self.blockSize / 8) // A 64-bit/128-bit representation of b. blockSize fit by accident.
|
|
139
|
+
|
|
140
|
+
// Step 1. Append padding
|
|
141
|
+
bitPadding(to: &self.accumulated, blockSize: self.blockSize, allowance: self.blockSize / 8)
|
|
142
|
+
|
|
143
|
+
// Step 2. Append Length a 64-bit representation of lengthInBits
|
|
144
|
+
self.accumulated += lengthBytes
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
var processedBytes = 0
|
|
148
|
+
for chunk in self.accumulated.batched(by: self.blockSize) {
|
|
149
|
+
if isLast || (self.accumulated.count - processedBytes) >= self.blockSize {
|
|
150
|
+
switch self.variant {
|
|
151
|
+
case .sha224, .sha256:
|
|
152
|
+
self.process32(block: chunk, currentHash: &self.accumulatedHash32)
|
|
153
|
+
case .sha384, .sha512:
|
|
154
|
+
self.process64(block: chunk, currentHash: &self.accumulatedHash64)
|
|
155
|
+
@unknown default:
|
|
156
|
+
preconditionFailure()
|
|
157
|
+
}
|
|
158
|
+
processedBytes += chunk.count
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
self.accumulated.removeFirst(processedBytes)
|
|
162
|
+
self.processedBytesTotalCount += processedBytes
|
|
163
|
+
|
|
164
|
+
// output current hash
|
|
165
|
+
var result = Array<UInt8>(repeating: 0, count: variant.digestLength)
|
|
166
|
+
switch self.variant {
|
|
167
|
+
case .sha224, .sha256:
|
|
168
|
+
var pos = 0
|
|
169
|
+
for idx in 0..<self.accumulatedHash32.count where idx < self.variant.finalLength {
|
|
170
|
+
let h = accumulatedHash32[idx]
|
|
171
|
+
result[pos + 0] = UInt8((h >> 24) & 0xff)
|
|
172
|
+
result[pos + 1] = UInt8((h >> 16) & 0xff)
|
|
173
|
+
result[pos + 2] = UInt8((h >> 8) & 0xff)
|
|
174
|
+
result[pos + 3] = UInt8(h & 0xff)
|
|
175
|
+
pos += 4
|
|
176
|
+
}
|
|
177
|
+
case .sha384, .sha512:
|
|
178
|
+
var pos = 0
|
|
179
|
+
for idx in 0..<self.accumulatedHash64.count where idx < self.variant.finalLength {
|
|
180
|
+
let h = accumulatedHash64[idx]
|
|
181
|
+
result[pos + 0] = UInt8((h >> 56) & 0xff)
|
|
182
|
+
result[pos + 1] = UInt8((h >> 48) & 0xff)
|
|
183
|
+
result[pos + 2] = UInt8((h >> 40) & 0xff)
|
|
184
|
+
result[pos + 3] = UInt8((h >> 32) & 0xff)
|
|
185
|
+
result[pos + 4] = UInt8((h >> 24) & 0xff)
|
|
186
|
+
result[pos + 5] = UInt8((h >> 16) & 0xff)
|
|
187
|
+
result[pos + 6] = UInt8((h >> 8) & 0xff)
|
|
188
|
+
result[pos + 7] = UInt8(h & 0xff)
|
|
189
|
+
pos += 8
|
|
190
|
+
}
|
|
191
|
+
@unknown default:
|
|
192
|
+
preconditionFailure()
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// reset hash value for instance
|
|
196
|
+
if isLast {
|
|
197
|
+
switch self.variant {
|
|
198
|
+
case .sha224, .sha256:
|
|
199
|
+
self.accumulatedHash32 = self.variant.h.lazy.map { UInt32($0) } // FIXME: UInt64 for process64
|
|
200
|
+
case .sha384, .sha512:
|
|
201
|
+
self.accumulatedHash64 = self.variant.h
|
|
202
|
+
@unknown default:
|
|
203
|
+
preconditionFailure()
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return result
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
final public class Blowfish {
|
|
211
|
+
public enum Error : Swift.Error {
|
|
212
|
+
case dataPaddingRequired
|
|
213
|
+
case invalidKeyOrInitializationVector
|
|
214
|
+
case invalidInitializationVector
|
|
215
|
+
case invalidBlockMode
|
|
216
|
+
public static func == (a: FaceCaptcha.Blowfish.Error, b: FaceCaptcha.Blowfish.Error) -> Swift.Bool
|
|
217
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
218
|
+
public var hashValue: Swift.Int {
|
|
219
|
+
get
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
public static let blockSize: Swift.Int
|
|
223
|
+
final public let keySize: Swift.Int
|
|
224
|
+
public init(key: Swift.Array<Swift.UInt8>, blockMode: FaceCaptcha.BlockMode = CBC(iv: Array<UInt8>(repeating: 0, count: Blowfish.blockSize)), padding: FaceCaptcha.Padding) throws
|
|
225
|
+
@objc deinit
|
|
226
|
+
}
|
|
227
|
+
extension FaceCaptcha.Blowfish : FaceCaptcha.Cipher {
|
|
228
|
+
final public func encrypt<C>(_ bytes: C) throws -> Swift.Array<Swift.UInt8> where C : Swift.Collection, C.Element == Swift.UInt8, C.Index == Swift.Int
|
|
229
|
+
final public func decrypt<C>(_ bytes: C) throws -> Swift.Array<Swift.UInt8> where C : Swift.Collection, C.Element == Swift.UInt8, C.Index == Swift.Int
|
|
230
|
+
}
|
|
231
|
+
public struct FCPrivateKeyModel {
|
|
232
|
+
public var token: Swift.String?
|
|
233
|
+
public var expires: Swift.String?
|
|
234
|
+
}
|
|
235
|
+
extension Swift.UInt64 {
|
|
236
|
+
@_specialize(exported: false, kind: full, where T == Swift.ArraySlice<Swift.UInt8>)
|
|
237
|
+
@inlinable internal init<T>(bytes: T, fromIndex index: T.Index) where T : Swift.Collection, T.Element == Swift.UInt8, T.Index == Swift.Int {
|
|
238
|
+
if bytes.isEmpty {
|
|
239
|
+
self = 0
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
let count = bytes.count
|
|
244
|
+
|
|
245
|
+
let val0 = count > 0 ? UInt64(bytes[index.advanced(by: 0)]) << 56 : 0
|
|
246
|
+
let val1 = count > 1 ? UInt64(bytes[index.advanced(by: 1)]) << 48 : 0
|
|
247
|
+
let val2 = count > 2 ? UInt64(bytes[index.advanced(by: 2)]) << 40 : 0
|
|
248
|
+
let val3 = count > 3 ? UInt64(bytes[index.advanced(by: 3)]) << 32 : 0
|
|
249
|
+
let val4 = count > 4 ? UInt64(bytes[index.advanced(by: 4)]) << 24 : 0
|
|
250
|
+
let val5 = count > 5 ? UInt64(bytes[index.advanced(by: 5)]) << 16 : 0
|
|
251
|
+
let val6 = count > 6 ? UInt64(bytes[index.advanced(by: 6)]) << 8 : 0
|
|
252
|
+
let val7 = count > 7 ? UInt64(bytes[index.advanced(by: 7)]) : 0
|
|
253
|
+
|
|
254
|
+
self = val0 | val1 | val2 | val3 | val4 | val5 | val6 | val7
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
public class CMAC : FaceCaptcha.Authenticator {
|
|
258
|
+
public enum Error : Swift.Error {
|
|
259
|
+
case wrongKeyLength
|
|
260
|
+
public static func == (a: FaceCaptcha.CMAC.Error, b: FaceCaptcha.CMAC.Error) -> Swift.Bool
|
|
261
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
262
|
+
public var hashValue: Swift.Int {
|
|
263
|
+
get
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
public init(key: Swift.Array<Swift.UInt8>) throws
|
|
267
|
+
public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
268
|
+
public func authenticate(_ bytes: Swift.Array<Swift.UInt8>, cipher: FaceCaptcha.Cipher) throws -> Swift.Array<Swift.UInt8>
|
|
269
|
+
@objc deinit
|
|
270
|
+
}
|
|
271
|
+
extension Swift.Array where Element == Swift.UInt8 {
|
|
272
|
+
public func toBase64() -> Swift.String?
|
|
273
|
+
public init(base64: Swift.String)
|
|
274
|
+
}
|
|
275
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor(unsafe) public class DocumentscopyCameraPreviewView : UIKit.UIView {
|
|
276
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public class var layerClass: Swift.AnyClass {
|
|
277
|
+
@_Concurrency.MainActor(unsafe) @objc get
|
|
278
|
+
}
|
|
279
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect)
|
|
280
|
+
@_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
281
|
+
@objc deinit
|
|
282
|
+
}
|
|
283
|
+
extension Swift.String {
|
|
284
|
+
@inlinable public var bytes: Swift.Array<Swift.UInt8> {
|
|
285
|
+
get {
|
|
286
|
+
data(using: String.Encoding.utf8, allowLossyConversion: true)?.bytes ?? Array(utf8)
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
@inlinable public func md5() -> Swift.String {
|
|
290
|
+
self.bytes.md5().toHexString()
|
|
291
|
+
}
|
|
292
|
+
@inlinable public func sha1() -> Swift.String {
|
|
293
|
+
self.bytes.sha1().toHexString()
|
|
294
|
+
}
|
|
295
|
+
@inlinable public func sha224() -> Swift.String {
|
|
296
|
+
self.bytes.sha224().toHexString()
|
|
297
|
+
}
|
|
298
|
+
@inlinable public func sha256() -> Swift.String {
|
|
299
|
+
self.bytes.sha256().toHexString()
|
|
300
|
+
}
|
|
301
|
+
@inlinable public func sha384() -> Swift.String {
|
|
302
|
+
self.bytes.sha384().toHexString()
|
|
303
|
+
}
|
|
304
|
+
@inlinable public func sha512() -> Swift.String {
|
|
305
|
+
self.bytes.sha512().toHexString()
|
|
306
|
+
}
|
|
307
|
+
@inlinable public func sha3(_ variant: FaceCaptcha.SHA3.Variant) -> Swift.String {
|
|
308
|
+
self.bytes.sha3(variant).toHexString()
|
|
309
|
+
}
|
|
310
|
+
@inlinable public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.String {
|
|
311
|
+
self.bytes.crc32(seed: seed, reflect: reflect).bytes().toHexString()
|
|
312
|
+
}
|
|
313
|
+
@inlinable public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.String {
|
|
314
|
+
self.bytes.crc32c(seed: seed, reflect: reflect).bytes().toHexString()
|
|
315
|
+
}
|
|
316
|
+
@inlinable public func crc16(seed: Swift.UInt16? = nil) -> Swift.String {
|
|
317
|
+
self.bytes.crc16(seed: seed).bytes().toHexString()
|
|
318
|
+
}
|
|
319
|
+
@inlinable public func encrypt(cipher: FaceCaptcha.Cipher) throws -> Swift.String {
|
|
320
|
+
try self.bytes.encrypt(cipher: cipher).toHexString()
|
|
321
|
+
}
|
|
322
|
+
@inlinable public func encryptToBase64(cipher: FaceCaptcha.Cipher) throws -> Swift.String? {
|
|
323
|
+
try self.bytes.encrypt(cipher: cipher).toBase64()
|
|
324
|
+
}
|
|
325
|
+
@inlinable public func authenticate<A>(with authenticator: A) throws -> Swift.String where A : FaceCaptcha.Authenticator {
|
|
326
|
+
try self.bytes.authenticate(with: authenticator).toHexString()
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
public protocol CustomInstructionView : UIKit.UIView {
|
|
330
|
+
var backButton: UIKit.UIButton! { get }
|
|
331
|
+
var continueButton: UIKit.UIButton! { get }
|
|
332
|
+
func changeLoadingVisibility(to visibility: FaceCaptcha.LoadingVisibility)
|
|
333
|
+
}
|
|
334
|
+
final public class HMAC : FaceCaptcha.Authenticator {
|
|
335
|
+
public enum Error : Swift.Error {
|
|
336
|
+
case authenticateError
|
|
337
|
+
case invalidInput
|
|
338
|
+
public static func == (a: FaceCaptcha.HMAC.Error, b: FaceCaptcha.HMAC.Error) -> Swift.Bool
|
|
339
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
340
|
+
public var hashValue: Swift.Int {
|
|
341
|
+
get
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
public enum Variant {
|
|
345
|
+
case sha1, sha256, sha384, sha512, md5
|
|
346
|
+
public static func == (a: FaceCaptcha.HMAC.Variant, b: FaceCaptcha.HMAC.Variant) -> Swift.Bool
|
|
347
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
348
|
+
public var hashValue: Swift.Int {
|
|
349
|
+
get
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
public init(key: Swift.Array<Swift.UInt8>, variant: FaceCaptcha.HMAC.Variant = .md5)
|
|
353
|
+
final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
354
|
+
@objc deinit
|
|
355
|
+
}
|
|
356
|
+
final public class GCM : FaceCaptcha.BlockMode {
|
|
357
|
+
public enum Mode {
|
|
358
|
+
case combined
|
|
359
|
+
case detached
|
|
360
|
+
public static func == (a: FaceCaptcha.GCM.Mode, b: FaceCaptcha.GCM.Mode) -> Swift.Bool
|
|
361
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
362
|
+
public var hashValue: Swift.Int {
|
|
363
|
+
get
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
final public let options: FaceCaptcha.BlockModeOption
|
|
367
|
+
public enum Error : Swift.Error {
|
|
368
|
+
case invalidInitializationVector
|
|
369
|
+
case fail
|
|
370
|
+
public static func == (a: FaceCaptcha.GCM.Error, b: FaceCaptcha.GCM.Error) -> Swift.Bool
|
|
371
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
372
|
+
public var hashValue: Swift.Int {
|
|
373
|
+
get
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
final public let customBlockSize: Swift.Int?
|
|
377
|
+
final public var authenticationTag: Swift.Array<Swift.UInt8>?
|
|
378
|
+
public init(iv: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, tagLength: Swift.Int = 16, mode: FaceCaptcha.GCM.Mode = .detached)
|
|
379
|
+
convenience public init(iv: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, mode: FaceCaptcha.GCM.Mode = .detached)
|
|
380
|
+
final public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
381
|
+
@objc deinit
|
|
382
|
+
}
|
|
383
|
+
final public class AES {
|
|
384
|
+
public enum Error : Swift.Error {
|
|
385
|
+
case invalidKeySize
|
|
386
|
+
case dataPaddingRequired
|
|
387
|
+
case invalidData
|
|
388
|
+
public static func == (a: FaceCaptcha.AES.Error, b: FaceCaptcha.AES.Error) -> Swift.Bool
|
|
389
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
390
|
+
public var hashValue: Swift.Int {
|
|
391
|
+
get
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
public enum Variant : Swift.Int {
|
|
395
|
+
case aes128, aes192, aes256
|
|
396
|
+
public init?(rawValue: Swift.Int)
|
|
397
|
+
public typealias RawValue = Swift.Int
|
|
398
|
+
public var rawValue: Swift.Int {
|
|
399
|
+
get
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
@usableFromInline
|
|
403
|
+
final internal let variantNr: Swift.Int
|
|
404
|
+
@usableFromInline
|
|
405
|
+
final internal let variantNb: Swift.Int
|
|
406
|
+
@usableFromInline
|
|
407
|
+
final internal let variantNk: Swift.Int
|
|
408
|
+
public static let blockSize: Swift.Int
|
|
409
|
+
final public let keySize: Swift.Int
|
|
410
|
+
final public let variant: FaceCaptcha.AES.Variant
|
|
411
|
+
@usableFromInline
|
|
412
|
+
final internal let blockMode: FaceCaptcha.BlockMode
|
|
413
|
+
@usableFromInline
|
|
414
|
+
final internal let padding: FaceCaptcha.Padding
|
|
415
|
+
@usableFromInline
|
|
416
|
+
final internal var expandedKey: Swift.Array<Swift.Array<Swift.UInt32>> {
|
|
417
|
+
get
|
|
418
|
+
set
|
|
419
|
+
}
|
|
420
|
+
@usableFromInline
|
|
421
|
+
final internal var expandedKeyInv: Swift.Array<Swift.Array<Swift.UInt32>> {
|
|
422
|
+
get
|
|
423
|
+
set
|
|
424
|
+
}
|
|
425
|
+
@usableFromInline
|
|
426
|
+
internal static let T0: [Swift.UInt32]
|
|
427
|
+
@usableFromInline
|
|
428
|
+
internal static let T0_INV: [Swift.UInt32]
|
|
429
|
+
@usableFromInline
|
|
430
|
+
internal static let T1: [Swift.UInt32]
|
|
431
|
+
@usableFromInline
|
|
432
|
+
internal static let T1_INV: [Swift.UInt32]
|
|
433
|
+
@usableFromInline
|
|
434
|
+
internal static let T2: [Swift.UInt32]
|
|
435
|
+
@usableFromInline
|
|
436
|
+
internal static let T2_INV: [Swift.UInt32]
|
|
437
|
+
@usableFromInline
|
|
438
|
+
internal static let T3: [Swift.UInt32]
|
|
439
|
+
@usableFromInline
|
|
440
|
+
internal static let T3_INV: [Swift.UInt32]
|
|
441
|
+
@usableFromInline
|
|
442
|
+
internal static let U1: [Swift.UInt32]
|
|
443
|
+
@usableFromInline
|
|
444
|
+
internal static let U2: [Swift.UInt32]
|
|
445
|
+
@usableFromInline
|
|
446
|
+
internal static let U3: [Swift.UInt32]
|
|
447
|
+
@usableFromInline
|
|
448
|
+
internal static let U4: [Swift.UInt32]
|
|
449
|
+
public init(key: Swift.Array<Swift.UInt8>, blockMode: FaceCaptcha.BlockMode, padding: FaceCaptcha.Padding = .pkcs7) throws
|
|
450
|
+
@inlinable final internal func encrypt(block: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>? {
|
|
451
|
+
if self.blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize {
|
|
452
|
+
return Array(block)
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
let rounds = self.variantNr
|
|
456
|
+
let rk = self.expandedKey
|
|
457
|
+
|
|
458
|
+
let b00 = UInt32(block[block.startIndex.advanced(by: 0)])
|
|
459
|
+
let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8
|
|
460
|
+
let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16
|
|
461
|
+
let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24
|
|
462
|
+
var b0 = b00 | b01 | b02 | b03
|
|
463
|
+
|
|
464
|
+
let b10 = UInt32(block[block.startIndex.advanced(by: 4)])
|
|
465
|
+
let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8
|
|
466
|
+
let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16
|
|
467
|
+
let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24
|
|
468
|
+
var b1 = b10 | b11 | b12 | b13
|
|
469
|
+
|
|
470
|
+
let b20 = UInt32(block[block.startIndex.advanced(by: 8)])
|
|
471
|
+
let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8
|
|
472
|
+
let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16
|
|
473
|
+
let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24
|
|
474
|
+
var b2 = b20 | b21 | b22 | b23
|
|
475
|
+
|
|
476
|
+
let b30 = UInt32(block[block.startIndex.advanced(by: 12)])
|
|
477
|
+
let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8
|
|
478
|
+
let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16
|
|
479
|
+
let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24
|
|
480
|
+
var b3 = b30 | b31 | b32 | b33
|
|
481
|
+
|
|
482
|
+
let tLength = 4
|
|
483
|
+
let t = UnsafeMutablePointer<UInt32>.allocate(capacity: tLength)
|
|
484
|
+
t.initialize(repeating: 0, count: tLength)
|
|
485
|
+
defer {
|
|
486
|
+
t.deinitialize(count: tLength)
|
|
487
|
+
t.deallocate()
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
for r in 0..<rounds - 1 {
|
|
491
|
+
t[0] = b0 ^ rk[r][0]
|
|
492
|
+
t[1] = b1 ^ rk[r][1]
|
|
493
|
+
t[2] = b2 ^ rk[r][2]
|
|
494
|
+
t[3] = b3 ^ rk[r][3]
|
|
495
|
+
|
|
496
|
+
let lb00 = AES.T0[Int(t[0] & 0xff)]
|
|
497
|
+
let lb01 = AES.T1[Int((t[1] >> 8) & 0xff)]
|
|
498
|
+
let lb02 = AES.T2[Int((t[2] >> 16) & 0xff)]
|
|
499
|
+
let lb03 = AES.T3[Int(t[3] >> 24)]
|
|
500
|
+
b0 = lb00 ^ lb01 ^ lb02 ^ lb03
|
|
501
|
+
|
|
502
|
+
let lb10 = AES.T0[Int(t[1] & 0xff)]
|
|
503
|
+
let lb11 = AES.T1[Int((t[2] >> 8) & 0xff)]
|
|
504
|
+
let lb12 = AES.T2[Int((t[3] >> 16) & 0xff)]
|
|
505
|
+
let lb13 = AES.T3[Int(t[0] >> 24)]
|
|
506
|
+
b1 = lb10 ^ lb11 ^ lb12 ^ lb13
|
|
507
|
+
|
|
508
|
+
let lb20 = AES.T0[Int(t[2] & 0xff)]
|
|
509
|
+
let lb21 = AES.T1[Int((t[3] >> 8) & 0xff)]
|
|
510
|
+
let lb22 = AES.T2[Int((t[0] >> 16) & 0xff)]
|
|
511
|
+
let lb23 = AES.T3[Int(t[1] >> 24)]
|
|
512
|
+
b2 = lb20 ^ lb21 ^ lb22 ^ lb23
|
|
513
|
+
|
|
514
|
+
let lb30 = AES.T0[Int(t[3] & 0xff)]
|
|
515
|
+
let lb31 = AES.T1[Int((t[0] >> 8) & 0xff)]
|
|
516
|
+
let lb32 = AES.T2[Int((t[1] >> 16) & 0xff)]
|
|
517
|
+
let lb33 = AES.T3[Int(t[2] >> 24)]
|
|
518
|
+
b3 = lb30 ^ lb31 ^ lb32 ^ lb33
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// last round
|
|
522
|
+
let r = rounds - 1
|
|
523
|
+
|
|
524
|
+
t[0] = b0 ^ rk[r][0]
|
|
525
|
+
t[1] = b1 ^ rk[r][1]
|
|
526
|
+
t[2] = b2 ^ rk[r][2]
|
|
527
|
+
t[3] = b3 ^ rk[r][3]
|
|
528
|
+
|
|
529
|
+
// rounds
|
|
530
|
+
b0 = F1(t[0], t[1], t[2], t[3]) ^ rk[rounds][0]
|
|
531
|
+
b1 = F1(t[1], t[2], t[3], t[0]) ^ rk[rounds][1]
|
|
532
|
+
b2 = F1(t[2], t[3], t[0], t[1]) ^ rk[rounds][2]
|
|
533
|
+
b3 = F1(t[3], t[0], t[1], t[2]) ^ rk[rounds][3]
|
|
534
|
+
|
|
535
|
+
let encrypted: Array<UInt8> = [
|
|
536
|
+
UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff),
|
|
537
|
+
UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff),
|
|
538
|
+
UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff),
|
|
539
|
+
UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff)
|
|
540
|
+
]
|
|
541
|
+
return encrypted
|
|
542
|
+
}
|
|
543
|
+
@usableFromInline
|
|
544
|
+
final internal func decrypt(block: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>?
|
|
545
|
+
@objc deinit
|
|
546
|
+
}
|
|
547
|
+
extension FaceCaptcha.AES {
|
|
548
|
+
@usableFromInline
|
|
549
|
+
@inline(__always) final internal func F1(_ x0: Swift.UInt32, _ x1: Swift.UInt32, _ x2: Swift.UInt32, _ x3: Swift.UInt32) -> Swift.UInt32
|
|
550
|
+
}
|
|
551
|
+
extension FaceCaptcha.AES : FaceCaptcha.Cipher {
|
|
552
|
+
@inlinable final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8> {
|
|
553
|
+
let blockSize = self.blockMode.customBlockSize ?? AES.blockSize
|
|
554
|
+
let chunks = bytes.batched(by: blockSize)
|
|
555
|
+
|
|
556
|
+
var oneTimeCryptor = try makeEncryptor()
|
|
557
|
+
var out = Array<UInt8>(reserveCapacity: bytes.count)
|
|
558
|
+
for chunk in chunks {
|
|
559
|
+
out += try oneTimeCryptor.update(withBytes: chunk, isLast: false)
|
|
560
|
+
}
|
|
561
|
+
// Padding may be added at the very end
|
|
562
|
+
out += try oneTimeCryptor.finish()
|
|
563
|
+
|
|
564
|
+
if self.blockMode.options.contains(.paddingRequired) && (out.count % AES.blockSize != 0) {
|
|
565
|
+
throw Error.dataPaddingRequired
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
return out
|
|
569
|
+
}
|
|
570
|
+
@inlinable final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8> {
|
|
571
|
+
if self.blockMode.options.contains(.paddingRequired) && (bytes.count % AES.blockSize != 0) {
|
|
572
|
+
throw Error.dataPaddingRequired
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
var oneTimeCryptor = try makeDecryptor()
|
|
576
|
+
let chunks = bytes.batched(by: AES.blockSize)
|
|
577
|
+
if chunks.isEmpty {
|
|
578
|
+
throw Error.invalidData
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
var out = Array<UInt8>(reserveCapacity: bytes.count)
|
|
582
|
+
|
|
583
|
+
var lastIdx = chunks.startIndex
|
|
584
|
+
chunks.indices.formIndex(&lastIdx, offsetBy: chunks.count - 1)
|
|
585
|
+
|
|
586
|
+
// To properly remove padding, `isLast` has to be known when called with the last chunk of ciphertext
|
|
587
|
+
// Last chunk of ciphertext may contains padded data so next call to update(..) won't be able to remove it
|
|
588
|
+
for idx in chunks.indices {
|
|
589
|
+
out += try oneTimeCryptor.update(withBytes: chunks[idx], isLast: idx == lastIdx)
|
|
590
|
+
}
|
|
591
|
+
return out
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
final public class SHA3 {
|
|
595
|
+
final public let blockSize: Swift.Int
|
|
596
|
+
final public let digestLength: Swift.Int
|
|
597
|
+
final public let markByte: Swift.UInt8
|
|
598
|
+
@usableFromInline
|
|
599
|
+
final internal var accumulated: [Swift.UInt8]
|
|
600
|
+
@usableFromInline
|
|
601
|
+
final internal var accumulatedHash: Swift.Array<Swift.UInt64>
|
|
602
|
+
public enum Variant {
|
|
603
|
+
case sha224, sha256, sha384, sha512, keccak224, keccak256, keccak384, keccak512
|
|
604
|
+
public var outputLength: Swift.Int {
|
|
605
|
+
get
|
|
606
|
+
}
|
|
607
|
+
public static func == (a: FaceCaptcha.SHA3.Variant, b: FaceCaptcha.SHA3.Variant) -> Swift.Bool
|
|
608
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
609
|
+
public var hashValue: Swift.Int {
|
|
610
|
+
get
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
public init(variant: FaceCaptcha.SHA3.Variant)
|
|
614
|
+
@inlinable final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8> {
|
|
615
|
+
do {
|
|
616
|
+
return try update(withBytes: bytes.slice, isLast: true)
|
|
617
|
+
} catch {
|
|
618
|
+
return []
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
@usableFromInline
|
|
622
|
+
final internal func process(block chunk: Swift.ArraySlice<Swift.UInt64>, currentHash hh: inout Swift.Array<Swift.UInt64>)
|
|
623
|
+
@objc deinit
|
|
624
|
+
}
|
|
625
|
+
extension FaceCaptcha.SHA3 : FaceCaptcha.Updatable {
|
|
626
|
+
@inlinable final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
627
|
+
self.accumulated += bytes
|
|
628
|
+
|
|
629
|
+
if isLast {
|
|
630
|
+
// Add padding
|
|
631
|
+
let markByteIndex = self.accumulated.count
|
|
632
|
+
|
|
633
|
+
// We need to always pad the input. Even if the input is a multiple of blockSize.
|
|
634
|
+
let r = self.blockSize * 8
|
|
635
|
+
let q = (r / 8) - (accumulated.count % (r / 8))
|
|
636
|
+
self.accumulated += Array<UInt8>(repeating: 0, count: q)
|
|
637
|
+
|
|
638
|
+
self.accumulated[markByteIndex] |= self.markByte
|
|
639
|
+
self.accumulated[self.accumulated.count - 1] |= 0x80
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
var processedBytes = 0
|
|
643
|
+
for chunk in self.accumulated.batched(by: self.blockSize) {
|
|
644
|
+
if isLast || (self.accumulated.count - processedBytes) >= self.blockSize {
|
|
645
|
+
self.process(block: chunk.toUInt64Array().slice, currentHash: &self.accumulatedHash)
|
|
646
|
+
processedBytes += chunk.count
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
self.accumulated.removeFirst(processedBytes)
|
|
650
|
+
|
|
651
|
+
// TODO: verify performance, reduce vs for..in
|
|
652
|
+
let result = self.accumulatedHash.reduce(into: Array<UInt8>()) { (result, value) in
|
|
653
|
+
result += value.bigEndian.bytes()
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// reset hash value for instance
|
|
657
|
+
if isLast {
|
|
658
|
+
self.accumulatedHash = Array<UInt64>(repeating: 0, count: self.digestLength)
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
return Array(result[0..<self.digestLength])
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
extension UIKit.UIViewController {
|
|
665
|
+
@_Concurrency.MainActor(unsafe) public func showAlert(title: Swift.String?, message: Swift.String)
|
|
666
|
+
}
|
|
667
|
+
final public class Scrypt {
|
|
668
|
+
public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, dkLen: Swift.Int, N: Swift.Int, r: Swift.Int, p: Swift.Int) throws
|
|
669
|
+
final public func calculate() throws -> [Swift.UInt8]
|
|
670
|
+
@objc deinit
|
|
671
|
+
}
|
|
672
|
+
extension FaceCaptcha.PKCS5 {
|
|
673
|
+
public struct PBKDF1 {
|
|
674
|
+
public enum Error : Swift.Error {
|
|
675
|
+
case invalidInput
|
|
676
|
+
case derivedKeyTooLong
|
|
677
|
+
public static func == (a: FaceCaptcha.PKCS5.PBKDF1.Error, b: FaceCaptcha.PKCS5.PBKDF1.Error) -> Swift.Bool
|
|
678
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
679
|
+
public var hashValue: Swift.Int {
|
|
680
|
+
get
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
public enum Variant {
|
|
684
|
+
case md5, sha1
|
|
685
|
+
@usableFromInline
|
|
686
|
+
internal var size: Swift.Int {
|
|
687
|
+
get
|
|
688
|
+
}
|
|
689
|
+
@usableFromInline
|
|
690
|
+
internal func calculateHash(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
691
|
+
public static func == (a: FaceCaptcha.PKCS5.PBKDF1.Variant, b: FaceCaptcha.PKCS5.PBKDF1.Variant) -> Swift.Bool
|
|
692
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
693
|
+
public var hashValue: Swift.Int {
|
|
694
|
+
get
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
@usableFromInline
|
|
698
|
+
internal let iterations: Swift.Int
|
|
699
|
+
@usableFromInline
|
|
700
|
+
internal let variant: FaceCaptcha.PKCS5.PBKDF1.Variant
|
|
701
|
+
@usableFromInline
|
|
702
|
+
internal let keyLength: Swift.Int
|
|
703
|
+
@usableFromInline
|
|
704
|
+
internal let t1: Swift.Array<Swift.UInt8>
|
|
705
|
+
public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, variant: FaceCaptcha.PKCS5.PBKDF1.Variant = .sha1, iterations: Swift.Int = 4096, keyLength: Swift.Int? = nil) throws
|
|
706
|
+
@inlinable public func calculate() -> Swift.Array<Swift.UInt8> {
|
|
707
|
+
var t = self.t1
|
|
708
|
+
for _ in 2...self.iterations {
|
|
709
|
+
t = self.variant.calculateHash(t)
|
|
710
|
+
}
|
|
711
|
+
return Array(t[0..<self.keyLength])
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
final public class Rabbit {
|
|
716
|
+
public enum Error : Swift.Error {
|
|
717
|
+
case invalidKeyOrInitializationVector
|
|
718
|
+
public static func == (a: FaceCaptcha.Rabbit.Error, b: FaceCaptcha.Rabbit.Error) -> Swift.Bool
|
|
719
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
720
|
+
public var hashValue: Swift.Int {
|
|
721
|
+
get
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
public static let ivSize: Swift.Int
|
|
725
|
+
public static let keySize: Swift.Int
|
|
726
|
+
public static let blockSize: Swift.Int
|
|
727
|
+
final public var keySize: Swift.Int {
|
|
728
|
+
get
|
|
729
|
+
}
|
|
730
|
+
convenience public init(key: Swift.Array<Swift.UInt8>) throws
|
|
731
|
+
public init(key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>?) throws
|
|
732
|
+
@objc deinit
|
|
733
|
+
}
|
|
734
|
+
extension FaceCaptcha.Rabbit : FaceCaptcha.Cipher {
|
|
735
|
+
final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
736
|
+
final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
737
|
+
}
|
|
738
|
+
public enum DocumentscopyError {
|
|
739
|
+
case invalidAppKey
|
|
740
|
+
case certifaceOff
|
|
741
|
+
case cameraSetupFailed
|
|
742
|
+
case noCameraPermission
|
|
743
|
+
case errorCapturePicture
|
|
744
|
+
case noInternetConnection
|
|
745
|
+
case validationError
|
|
746
|
+
case faceCaptchaNotExecuted
|
|
747
|
+
public static func == (a: FaceCaptcha.DocumentscopyError, b: FaceCaptcha.DocumentscopyError) -> Swift.Bool
|
|
748
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
749
|
+
public var hashValue: Swift.Int {
|
|
750
|
+
get
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
public struct CBC : FaceCaptcha.BlockMode {
|
|
754
|
+
public enum Error : Swift.Error {
|
|
755
|
+
case invalidInitializationVector
|
|
756
|
+
public static func == (a: FaceCaptcha.CBC.Error, b: FaceCaptcha.CBC.Error) -> Swift.Bool
|
|
757
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
758
|
+
public var hashValue: Swift.Int {
|
|
759
|
+
get
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
763
|
+
public let customBlockSize: Swift.Int?
|
|
764
|
+
public init(iv: Swift.Array<Swift.UInt8>)
|
|
765
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
766
|
+
}
|
|
767
|
+
public struct FCResultModel {
|
|
768
|
+
}
|
|
769
|
+
public protocol PaddingProtocol {
|
|
770
|
+
func add(to: Swift.Array<Swift.UInt8>, blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
|
|
771
|
+
func remove(from: Swift.Array<Swift.UInt8>, blockSize: Swift.Int?) -> Swift.Array<Swift.UInt8>
|
|
772
|
+
}
|
|
773
|
+
public enum Padding : FaceCaptcha.PaddingProtocol {
|
|
774
|
+
case noPadding, zeroPadding, pkcs7, pkcs5, iso78164
|
|
775
|
+
public func add(to: Swift.Array<Swift.UInt8>, blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
|
|
776
|
+
public func remove(from: Swift.Array<Swift.UInt8>, blockSize: Swift.Int?) -> Swift.Array<Swift.UInt8>
|
|
777
|
+
public static func == (a: FaceCaptcha.Padding, b: FaceCaptcha.Padding) -> Swift.Bool
|
|
778
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
779
|
+
public var hashValue: Swift.Int {
|
|
780
|
+
get
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
public struct FCUserModel {
|
|
784
|
+
public var user: Swift.String?
|
|
785
|
+
public var pass: Swift.String?
|
|
786
|
+
public var cpf: Swift.String?
|
|
787
|
+
public var name: Swift.String?
|
|
788
|
+
public var birth: Swift.String?
|
|
789
|
+
public var privateKey: Swift.String?
|
|
790
|
+
public var image: UIKit.UIImage?
|
|
791
|
+
public init(_ user: Swift.String, _ pass: Swift.String, _ cpf: Swift.String, _ name: Swift.String, _ birth: Swift.String, _ overlapImage: UIKit.UIImage? = nil)
|
|
792
|
+
}
|
|
793
|
+
public typealias DocumentscopyCustomLoadingView = UIKit.UIView
|
|
794
|
+
@_hasMissingDesignatedInitializers public class FCStringAPI {
|
|
795
|
+
public static let K_BASE_URL: Swift.String
|
|
796
|
+
public static let K_CHECK_AUTH: Swift.String
|
|
797
|
+
public static let K_CHALLENGE: Swift.String
|
|
798
|
+
public static let K_CAPTCHA: Swift.String
|
|
799
|
+
public static let K_SERVER: Swift.String
|
|
800
|
+
public static let K_API_KEY: Swift.String
|
|
801
|
+
@objc deinit
|
|
802
|
+
}
|
|
803
|
+
public struct Liveness3DError {
|
|
804
|
+
public let errorCode: Swift.Int
|
|
805
|
+
public let errorMessage: Swift.String
|
|
806
|
+
}
|
|
807
|
+
public enum Liveness3DErrorCode : Swift.Int {
|
|
808
|
+
case INVALID_APP_KEY
|
|
809
|
+
case NO_CAMERA_PERMISSION
|
|
810
|
+
case NO_INTERNET_CONNECTION
|
|
811
|
+
case LIVENESS_NOT_COMPLETED
|
|
812
|
+
case LIVENESS_NOT_INITIALIZED
|
|
813
|
+
public init?(rawValue: Swift.Int)
|
|
814
|
+
public typealias RawValue = Swift.Int
|
|
815
|
+
public var rawValue: Swift.Int {
|
|
816
|
+
get
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
public struct Liveness3DSuccess {
|
|
820
|
+
public var valid: Swift.Bool?
|
|
821
|
+
public var codID: Swift.Double?
|
|
822
|
+
public var cause: Swift.String?
|
|
823
|
+
public var protocolo: Swift.String?
|
|
824
|
+
public var scanResultBlob: Swift.String?
|
|
825
|
+
}
|
|
826
|
+
public struct BlockModeOption : Swift.OptionSet {
|
|
827
|
+
public let rawValue: Swift.Int
|
|
828
|
+
public init(rawValue: Swift.Int)
|
|
829
|
+
@usableFromInline
|
|
830
|
+
internal static let none: FaceCaptcha.BlockModeOption
|
|
831
|
+
@usableFromInline
|
|
832
|
+
internal static let initializationVectorRequired: FaceCaptcha.BlockModeOption
|
|
833
|
+
@usableFromInline
|
|
834
|
+
internal static let paddingRequired: FaceCaptcha.BlockModeOption
|
|
835
|
+
@usableFromInline
|
|
836
|
+
internal static let useEncryptToDecrypt: FaceCaptcha.BlockModeOption
|
|
837
|
+
public typealias ArrayLiteralElement = FaceCaptcha.BlockModeOption
|
|
838
|
+
public typealias Element = FaceCaptcha.BlockModeOption
|
|
839
|
+
public typealias RawValue = Swift.Int
|
|
840
|
+
}
|
|
841
|
+
public protocol CipherModeWorker {
|
|
842
|
+
var cipherOperation: FaceCaptcha.CipherOperationOnBlock { get }
|
|
843
|
+
var additionalBufferSize: Swift.Int { get }
|
|
844
|
+
@inlinable mutating func encrypt(block plaintext: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
845
|
+
@inlinable mutating func decrypt(block ciphertext: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
846
|
+
}
|
|
847
|
+
public protocol BlockModeWorker : FaceCaptcha.CipherModeWorker {
|
|
848
|
+
var blockSize: Swift.Int { get }
|
|
849
|
+
}
|
|
850
|
+
public protocol CounterModeWorker : FaceCaptcha.CipherModeWorker {
|
|
851
|
+
associatedtype Counter
|
|
852
|
+
var counter: Self.Counter { get set }
|
|
853
|
+
}
|
|
854
|
+
public protocol SeekableModeWorker : FaceCaptcha.CipherModeWorker {
|
|
855
|
+
mutating func seek(to position: Swift.Int) throws
|
|
856
|
+
}
|
|
857
|
+
public protocol StreamModeWorker : FaceCaptcha.CipherModeWorker {
|
|
858
|
+
}
|
|
859
|
+
public protocol FinalizingEncryptModeWorker : FaceCaptcha.CipherModeWorker {
|
|
860
|
+
mutating func finalize(encrypt ciphertext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
|
|
861
|
+
}
|
|
862
|
+
public protocol FinalizingDecryptModeWorker : FaceCaptcha.CipherModeWorker {
|
|
863
|
+
@discardableResult
|
|
864
|
+
mutating func willDecryptLast(bytes ciphertext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
|
|
865
|
+
mutating func didDecryptLast(bytes plaintext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
|
|
866
|
+
mutating func finalize(decrypt plaintext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
|
|
867
|
+
}
|
|
868
|
+
extension FaceCaptcha.Rabbit {
|
|
869
|
+
convenience public init(key: Swift.String) throws
|
|
870
|
+
convenience public init(key: Swift.String, iv: Swift.String) throws
|
|
871
|
+
}
|
|
872
|
+
@_hasMissingDesignatedInitializers final public class AEADChaCha20Poly1305 : FaceCaptcha.AEAD {
|
|
873
|
+
public static let kLen: Swift.Int
|
|
874
|
+
public static var ivRange: Swift.Range<Swift.Int>
|
|
875
|
+
public static func encrypt(_ plainText: Swift.Array<Swift.UInt8>, key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>, authenticationHeader: Swift.Array<Swift.UInt8>) throws -> (cipherText: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>)
|
|
876
|
+
public static func decrypt(_ cipherText: Swift.Array<Swift.UInt8>, key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>, authenticationHeader: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>) throws -> (plainText: Swift.Array<Swift.UInt8>, success: Swift.Bool)
|
|
877
|
+
@objc deinit
|
|
878
|
+
}
|
|
879
|
+
public struct CCM {
|
|
880
|
+
public enum Error : Swift.Error {
|
|
881
|
+
case invalidInitializationVector
|
|
882
|
+
case invalidParameter
|
|
883
|
+
case fail
|
|
884
|
+
public static func == (a: FaceCaptcha.CCM.Error, b: FaceCaptcha.CCM.Error) -> Swift.Bool
|
|
885
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
886
|
+
public var hashValue: Swift.Int {
|
|
887
|
+
get
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
891
|
+
public let customBlockSize: Swift.Int?
|
|
892
|
+
public var authenticationTag: Swift.Array<Swift.UInt8>?
|
|
893
|
+
public init(iv: Swift.Array<Swift.UInt8>, tagLength: Swift.Int, messageLength: Swift.Int, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil)
|
|
894
|
+
public init(iv: Swift.Array<Swift.UInt8>, tagLength: Swift.Int, messageLength: Swift.Int, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil)
|
|
895
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
896
|
+
}
|
|
897
|
+
public protocol CustomCameraPermissionView : UIKit.UIView {
|
|
898
|
+
var backButton: UIKit.UIButton! { get }
|
|
899
|
+
var checkPermissionButton: UIKit.UIButton! { get }
|
|
900
|
+
var openSettingsButton: UIKit.UIButton! { get }
|
|
901
|
+
var closeButton: UIKit.UIButton! { get }
|
|
902
|
+
func showBottomSheet(visibility: FaceCaptcha.Visibility)
|
|
903
|
+
}
|
|
904
|
+
public protocol DocumentscopyCustomInstructionView : UIKit.UIView {
|
|
905
|
+
var backButton: UIKit.UIButton! { get }
|
|
906
|
+
var viewCNH: UIKit.UIView! { get }
|
|
907
|
+
var viewRG: UIKit.UIView! { get }
|
|
908
|
+
}
|
|
909
|
+
public struct FCTypeFaceModel {
|
|
910
|
+
}
|
|
911
|
+
public protocol Cryptors : AnyObject {
|
|
912
|
+
func makeEncryptor() throws -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable
|
|
913
|
+
func makeDecryptor() throws -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable
|
|
914
|
+
static func randomIV(_ blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
|
|
915
|
+
}
|
|
916
|
+
extension FaceCaptcha.Cryptors {
|
|
917
|
+
public static func randomIV(_ count: Swift.Int) -> Swift.Array<Swift.UInt8>
|
|
918
|
+
}
|
|
919
|
+
public struct FCValidCaptchaModel {
|
|
920
|
+
public var valid: Swift.Bool?
|
|
921
|
+
public var codID: Swift.Double?
|
|
922
|
+
public var cause: Swift.String?
|
|
923
|
+
public var uidProtocol: Swift.String?
|
|
924
|
+
}
|
|
925
|
+
public protocol Authenticator {
|
|
926
|
+
func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
927
|
+
}
|
|
928
|
+
@usableFromInline
|
|
929
|
+
internal struct BatchedCollectionIndex<Base> where Base : Swift.Collection {
|
|
930
|
+
}
|
|
931
|
+
extension FaceCaptcha.BatchedCollectionIndex : Swift.Comparable {
|
|
932
|
+
@usableFromInline
|
|
933
|
+
internal static func == <Base>(lhs: FaceCaptcha.BatchedCollectionIndex<Base>, rhs: FaceCaptcha.BatchedCollectionIndex<Base>) -> Swift.Bool where Base : Swift.Collection
|
|
934
|
+
@usableFromInline
|
|
935
|
+
internal static func < <Base>(lhs: FaceCaptcha.BatchedCollectionIndex<Base>, rhs: FaceCaptcha.BatchedCollectionIndex<Base>) -> Swift.Bool where Base : Swift.Collection
|
|
936
|
+
}
|
|
937
|
+
@usableFromInline
|
|
938
|
+
internal struct BatchedCollection<Base> : Swift.Collection where Base : Swift.Collection {
|
|
939
|
+
@usableFromInline
|
|
940
|
+
internal init(base: Base, size: Swift.Int)
|
|
941
|
+
@usableFromInline
|
|
942
|
+
internal typealias Index = FaceCaptcha.BatchedCollectionIndex<Base>
|
|
943
|
+
@usableFromInline
|
|
944
|
+
internal var startIndex: FaceCaptcha.BatchedCollection<Base>.Index {
|
|
945
|
+
get
|
|
946
|
+
}
|
|
947
|
+
@usableFromInline
|
|
948
|
+
internal var endIndex: FaceCaptcha.BatchedCollection<Base>.Index {
|
|
949
|
+
get
|
|
950
|
+
}
|
|
951
|
+
@usableFromInline
|
|
952
|
+
internal func index(after idx: FaceCaptcha.BatchedCollection<Base>.Index) -> FaceCaptcha.BatchedCollection<Base>.Index
|
|
953
|
+
@usableFromInline
|
|
954
|
+
internal subscript(idx: FaceCaptcha.BatchedCollection<Base>.Index) -> Base.SubSequence {
|
|
955
|
+
get
|
|
956
|
+
}
|
|
957
|
+
@usableFromInline
|
|
958
|
+
internal typealias Element = Base.SubSequence
|
|
959
|
+
@usableFromInline
|
|
960
|
+
internal typealias Indices = Swift.DefaultIndices<FaceCaptcha.BatchedCollection<Base>>
|
|
961
|
+
@usableFromInline
|
|
962
|
+
internal typealias Iterator = Swift.IndexingIterator<FaceCaptcha.BatchedCollection<Base>>
|
|
963
|
+
@usableFromInline
|
|
964
|
+
internal typealias SubSequence = Swift.Slice<FaceCaptcha.BatchedCollection<Base>>
|
|
965
|
+
}
|
|
966
|
+
extension Swift.Collection {
|
|
967
|
+
@inlinable internal func batched(by size: Swift.Int) -> FaceCaptcha.BatchedCollection<Self> {
|
|
968
|
+
BatchedCollection(base: self, size: size)
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
final public class MD5 {
|
|
972
|
+
public init()
|
|
973
|
+
final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
974
|
+
@objc deinit
|
|
975
|
+
}
|
|
976
|
+
extension FaceCaptcha.MD5 : FaceCaptcha.Updatable {
|
|
977
|
+
final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
|
|
978
|
+
}
|
|
979
|
+
public protocol DocumentscopyDelegate : AnyObject {
|
|
980
|
+
func handleDocumentscopyCompleted()
|
|
981
|
+
func handleDocumentscopyError(error: FaceCaptcha.DocumentscopyError)
|
|
982
|
+
func handleDocumentscopyCanceled()
|
|
983
|
+
}
|
|
984
|
+
final public class ChaCha20 {
|
|
985
|
+
public enum Error : Swift.Error {
|
|
986
|
+
case invalidKeyOrInitializationVector
|
|
987
|
+
case notSupported
|
|
988
|
+
public static func == (a: FaceCaptcha.ChaCha20.Error, b: FaceCaptcha.ChaCha20.Error) -> Swift.Bool
|
|
989
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
990
|
+
public var hashValue: Swift.Int {
|
|
991
|
+
get
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
public static let blockSize: Swift.Int
|
|
995
|
+
final public let keySize: Swift.Int
|
|
996
|
+
public init(key: Swift.Array<Swift.UInt8>, iv nonce: Swift.Array<Swift.UInt8>) throws
|
|
997
|
+
@objc deinit
|
|
998
|
+
}
|
|
999
|
+
extension FaceCaptcha.ChaCha20 : FaceCaptcha.Cipher {
|
|
1000
|
+
final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1001
|
+
final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1002
|
+
}
|
|
1003
|
+
extension FaceCaptcha.ChaCha20 {
|
|
1004
|
+
public struct ChaChaEncryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
1005
|
+
public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
|
|
1006
|
+
public func seek(to: Swift.Int) throws
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
extension FaceCaptcha.ChaCha20 {
|
|
1010
|
+
public struct ChaChaDecryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
1011
|
+
public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = true) throws -> Swift.Array<Swift.UInt8>
|
|
1012
|
+
public func seek(to: Swift.Int) throws
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
extension FaceCaptcha.ChaCha20 : FaceCaptcha.Cryptors {
|
|
1016
|
+
final public func makeEncryptor() -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable
|
|
1017
|
+
final public func makeDecryptor() -> FaceCaptcha.Cryptor & FaceCaptcha.Updatable
|
|
1018
|
+
}
|
|
1019
|
+
@objc @_Concurrency.MainActor(unsafe) public class Liveness3DViewController : UIKit.UIViewController {
|
|
1020
|
+
@_Concurrency.MainActor(unsafe) weak public var delegate: FaceCaptcha.Liveness3DDelegate?
|
|
1021
|
+
@_Concurrency.MainActor(unsafe) public init(endpoint: Swift.String, liveness3DUser: FaceCaptcha.Liveness3DUser, debugOn: Swift.Bool, customInstructionView: FaceCaptcha.CustomInstructionView? = nil, customPermissionView: FaceCaptcha.CustomCameraPermissionView? = nil)
|
|
1022
|
+
@_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
1023
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func loadView()
|
|
1024
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func viewDidLoad()
|
|
1025
|
+
@objc deinit
|
|
1026
|
+
}
|
|
1027
|
+
public struct HybridEcosystemLiveness3DViewAppearance {
|
|
1028
|
+
public init(backgroundColor: UIKit.UIColor, loadingColor: UIKit.UIColor)
|
|
1029
|
+
}
|
|
1030
|
+
@objc @_Concurrency.MainActor(unsafe) public class HybridEcosystemLiveness3DViewController : UIKit.UIViewController {
|
|
1031
|
+
@_Concurrency.MainActor(unsafe) weak public var delegate: FaceCaptcha.Liveness3DDelegate?
|
|
1032
|
+
@_Concurrency.MainActor(unsafe) public init(liveness3DUser: FaceCaptcha.Liveness3DUser, customAppearance: FaceCaptcha.HybridEcosystemLiveness3DViewAppearance? = nil)
|
|
1033
|
+
@_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
1034
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func loadView()
|
|
1035
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func viewDidLoad()
|
|
1036
|
+
@objc deinit
|
|
1037
|
+
}
|
|
1038
|
+
extension Swift.FixedWidthInteger {
|
|
1039
|
+
@inlinable internal func bytes(totalBytes: Swift.Int = MemoryLayout<Self>.size) -> Swift.Array<Swift.UInt8> {
|
|
1040
|
+
arrayOfBytes(value: self.littleEndian, length: totalBytes)
|
|
1041
|
+
// TODO: adjust bytes order
|
|
1042
|
+
// var value = self.littleEndian
|
|
1043
|
+
// return withUnsafeBytes(of: &value, Array.init).reversed()
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
@_hasMissingDesignatedInitializers public class Strings {
|
|
1047
|
+
@objc deinit
|
|
1048
|
+
}
|
|
1049
|
+
final public class Checksum {
|
|
1050
|
+
@usableFromInline
|
|
1051
|
+
internal static let table32: [Swift.UInt32]
|
|
1052
|
+
@usableFromInline
|
|
1053
|
+
internal static let table32c: [Swift.UInt32]
|
|
1054
|
+
@usableFromInline
|
|
1055
|
+
internal static let table16: [Swift.UInt16]
|
|
1056
|
+
@usableFromInline
|
|
1057
|
+
internal init()
|
|
1058
|
+
@inlinable final internal func crc32(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32 {
|
|
1059
|
+
var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF
|
|
1060
|
+
for chunk in message.batched(by: 256) {
|
|
1061
|
+
for b in chunk {
|
|
1062
|
+
let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF)
|
|
1063
|
+
crc = (crc >> 8) ^ Checksum.table32[idx]
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF
|
|
1067
|
+
}
|
|
1068
|
+
@inlinable final internal func crc32c(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32 {
|
|
1069
|
+
var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF
|
|
1070
|
+
for chunk in message.batched(by: 256) {
|
|
1071
|
+
for b in chunk {
|
|
1072
|
+
let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF)
|
|
1073
|
+
crc = (crc >> 8) ^ Checksum.table32c[idx]
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF
|
|
1077
|
+
}
|
|
1078
|
+
@inlinable final internal func crc16(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt16? = nil) -> Swift.UInt16 {
|
|
1079
|
+
var crc: UInt16 = seed != nil ? seed! : 0x0000
|
|
1080
|
+
for chunk in message.batched(by: 256) {
|
|
1081
|
+
for b in chunk {
|
|
1082
|
+
crc = (crc >> 8) ^ Checksum.table16[Int((crc ^ UInt16(b)) & 0xFF)]
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
return crc
|
|
1086
|
+
}
|
|
1087
|
+
@objc deinit
|
|
1088
|
+
}
|
|
1089
|
+
extension FaceCaptcha.Checksum {
|
|
1090
|
+
@inlinable public static func crc32(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32 {
|
|
1091
|
+
Checksum().crc32(message, seed: seed, reflect: reflect)
|
|
1092
|
+
}
|
|
1093
|
+
@inlinable public static func crc32c(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32 {
|
|
1094
|
+
Checksum().crc32c(message, seed: seed, reflect: reflect)
|
|
1095
|
+
}
|
|
1096
|
+
@inlinable public static func crc16(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt16? = nil) -> Swift.UInt16 {
|
|
1097
|
+
Checksum().crc16(message, seed: seed)
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
@available(*, renamed: "Digest")
|
|
1101
|
+
public typealias Hash = FaceCaptcha.Digest
|
|
1102
|
+
public struct Digest {
|
|
1103
|
+
public static func md5(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1104
|
+
public static func sha1(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1105
|
+
public static func sha224(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1106
|
+
public static func sha256(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1107
|
+
public static func sha384(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1108
|
+
public static func sha512(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
|
|
1109
|
+
public static func sha2(_ bytes: Swift.Array<Swift.UInt8>, variant: FaceCaptcha.SHA2.Variant) -> Swift.Array<Swift.UInt8>
|
|
1110
|
+
public static func sha3(_ bytes: Swift.Array<Swift.UInt8>, variant: FaceCaptcha.SHA3.Variant) -> Swift.Array<Swift.UInt8>
|
|
1111
|
+
}
|
|
1112
|
+
extension Swift.String {
|
|
1113
|
+
public func decryptBase64ToString(cipher: FaceCaptcha.Cipher) throws -> Swift.String
|
|
1114
|
+
public func decryptBase64(cipher: FaceCaptcha.Cipher) throws -> Swift.Array<Swift.UInt8>
|
|
1115
|
+
}
|
|
1116
|
+
public typealias LoadingVisibility = FaceCaptcha.Visibility
|
|
1117
|
+
public enum Visibility {
|
|
1118
|
+
case displayed, hidden
|
|
1119
|
+
public static func == (a: FaceCaptcha.Visibility, b: FaceCaptcha.Visibility) -> Swift.Bool
|
|
1120
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1121
|
+
public var hashValue: Swift.Int {
|
|
1122
|
+
get
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
@_hasMissingDesignatedInitializers final public class FCWrapper {
|
|
1126
|
+
final public var ok: Swift.Bool
|
|
1127
|
+
public init(json: Swift.String)
|
|
1128
|
+
final public func map<T>(optional: Swift.Bool = false, withClosure closure: ((FaceCaptcha.FCWrapper) -> (T?))? = nil) -> T?
|
|
1129
|
+
final public func mapArrayOfObjects<T>(optional: Swift.Bool = false, withClosure closure: (FaceCaptcha.FCWrapper) -> (T.Iterator.Element)) -> T? where T : Swift.Collection
|
|
1130
|
+
final public subscript(name: Swift.String) -> FaceCaptcha.FCWrapper {
|
|
1131
|
+
get
|
|
1132
|
+
}
|
|
1133
|
+
@objc deinit
|
|
1134
|
+
}
|
|
1135
|
+
public enum PKCS7 {
|
|
1136
|
+
}
|
|
1137
|
+
@usableFromInline
|
|
1138
|
+
final internal class BlockEncryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
1139
|
+
@usableFromInline
|
|
1140
|
+
internal init(blockSize: Swift.Int, padding: FaceCaptcha.Padding, _ worker: FaceCaptcha.CipherModeWorker) throws
|
|
1141
|
+
final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool) throws -> Swift.Array<Swift.UInt8>
|
|
1142
|
+
@usableFromInline
|
|
1143
|
+
final internal func seek(to: Swift.Int) throws
|
|
1144
|
+
@objc @usableFromInline
|
|
1145
|
+
deinit
|
|
1146
|
+
}
|
|
1147
|
+
public struct ECB : FaceCaptcha.BlockMode {
|
|
1148
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
1149
|
+
public let customBlockSize: Swift.Int?
|
|
1150
|
+
public init()
|
|
1151
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1152
|
+
}
|
|
1153
|
+
public struct FCBaseModel {
|
|
1154
|
+
public static let K_APP_KEY: Swift.String
|
|
1155
|
+
public static let K_P: Swift.String
|
|
1156
|
+
}
|
|
1157
|
+
public typealias CipherOperationOnBlock = (_ block: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>?
|
|
1158
|
+
public protocol BlockMode {
|
|
1159
|
+
var options: FaceCaptcha.BlockModeOption { get }
|
|
1160
|
+
@inlinable func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1161
|
+
var customBlockSize: Swift.Int? { get }
|
|
1162
|
+
}
|
|
1163
|
+
extension FaceCaptcha.Blowfish {
|
|
1164
|
+
convenience public init(key: Swift.String, iv: Swift.String, padding: FaceCaptcha.Padding = .pkcs7) throws
|
|
1165
|
+
}
|
|
1166
|
+
public protocol _UInt8Type {
|
|
1167
|
+
}
|
|
1168
|
+
extension Swift.UInt8 : FaceCaptcha._UInt8Type {
|
|
1169
|
+
}
|
|
1170
|
+
extension Swift.UInt8 {
|
|
1171
|
+
public func bits() -> [FaceCaptcha.Bit]
|
|
1172
|
+
public func bits() -> Swift.String
|
|
1173
|
+
}
|
|
1174
|
+
public protocol DocumentscopyCustomResultView : UIKit.UIView {
|
|
1175
|
+
var resultButton: UIKit.UIButton! { get }
|
|
1176
|
+
func display(for resultType: FaceCaptcha.DocumentscopyResultType)
|
|
1177
|
+
}
|
|
1178
|
+
public func generateAppKey(user: Swift.String, passcode: Swift.String, cpf: Swift.String, nome: Swift.String, dtNasciemnto: Swift.String, completion: @escaping (Swift.String) -> Swift.Void)
|
|
1179
|
+
public protocol FaceCaptchaView : UIKit.UIView {
|
|
1180
|
+
var cameraContainer: FaceCaptcha.CameraPreviewView! { get }
|
|
1181
|
+
var startButton: UIKit.UIButton! { get }
|
|
1182
|
+
var closeButton: UIKit.UIButton! { get }
|
|
1183
|
+
var activityIndicatorView: UIKit.UIView! { get }
|
|
1184
|
+
var challengeIcon: UIKit.UIImageView! { get }
|
|
1185
|
+
var challengeText: UIKit.UIImageView! { get }
|
|
1186
|
+
var challengeContainer: UIKit.UIView? { get }
|
|
1187
|
+
var initialInstructionView: UIKit.UIView? { get }
|
|
1188
|
+
}
|
|
1189
|
+
public protocol Cryptor {
|
|
1190
|
+
mutating func seek(to: Swift.Int) throws
|
|
1191
|
+
}
|
|
1192
|
+
final public class SHA1 {
|
|
1193
|
+
@usableFromInline
|
|
1194
|
+
internal static let digestLength: Swift.Int
|
|
1195
|
+
@usableFromInline
|
|
1196
|
+
internal static let blockSize: Swift.Int
|
|
1197
|
+
@usableFromInline
|
|
1198
|
+
internal static let hashInitialValue: Swift.ContiguousArray<Swift.UInt32>
|
|
1199
|
+
@usableFromInline
|
|
1200
|
+
final internal var accumulated: [Swift.UInt8]
|
|
1201
|
+
@usableFromInline
|
|
1202
|
+
final internal var processedBytesTotalCount: Swift.Int
|
|
1203
|
+
@usableFromInline
|
|
1204
|
+
final internal var accumulatedHash: Swift.ContiguousArray<Swift.UInt32>
|
|
1205
|
+
public init()
|
|
1206
|
+
@inlinable final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8> {
|
|
1207
|
+
do {
|
|
1208
|
+
return try update(withBytes: bytes.slice, isLast: true)
|
|
1209
|
+
} catch {
|
|
1210
|
+
return []
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
@usableFromInline
|
|
1214
|
+
final internal func process(block chunk: Swift.ArraySlice<Swift.UInt8>, currentHash hh: inout Swift.ContiguousArray<Swift.UInt32>)
|
|
1215
|
+
@objc deinit
|
|
1216
|
+
}
|
|
1217
|
+
extension FaceCaptcha.SHA1 : FaceCaptcha.Updatable {
|
|
1218
|
+
@discardableResult
|
|
1219
|
+
@inlinable final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
1220
|
+
self.accumulated += bytes
|
|
1221
|
+
|
|
1222
|
+
if isLast {
|
|
1223
|
+
let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8
|
|
1224
|
+
let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b
|
|
1225
|
+
|
|
1226
|
+
// Step 1. Append padding
|
|
1227
|
+
bitPadding(to: &self.accumulated, blockSize: SHA1.blockSize, allowance: 64 / 8)
|
|
1228
|
+
|
|
1229
|
+
// Step 2. Append Length a 64-bit representation of lengthInBits
|
|
1230
|
+
self.accumulated += lengthBytes
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
var processedBytes = 0
|
|
1234
|
+
for chunk in self.accumulated.batched(by: SHA1.blockSize) {
|
|
1235
|
+
if isLast || (self.accumulated.count - processedBytes) >= SHA1.blockSize {
|
|
1236
|
+
self.process(block: chunk, currentHash: &self.accumulatedHash)
|
|
1237
|
+
processedBytes += chunk.count
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
self.accumulated.removeFirst(processedBytes)
|
|
1241
|
+
self.processedBytesTotalCount += processedBytes
|
|
1242
|
+
|
|
1243
|
+
// output current hash
|
|
1244
|
+
var result = Array<UInt8>(repeating: 0, count: SHA1.digestLength)
|
|
1245
|
+
var pos = 0
|
|
1246
|
+
for idx in 0..<self.accumulatedHash.count {
|
|
1247
|
+
let h = self.accumulatedHash[idx]
|
|
1248
|
+
result[pos + 0] = UInt8((h >> 24) & 0xff)
|
|
1249
|
+
result[pos + 1] = UInt8((h >> 16) & 0xff)
|
|
1250
|
+
result[pos + 2] = UInt8((h >> 8) & 0xff)
|
|
1251
|
+
result[pos + 3] = UInt8(h & 0xff)
|
|
1252
|
+
pos += 4
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
// reset hash value for instance
|
|
1256
|
+
if isLast {
|
|
1257
|
+
self.accumulatedHash = SHA1.hashInitialValue
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
return result
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
public enum CipherError : Swift.Error {
|
|
1264
|
+
case encrypt
|
|
1265
|
+
case decrypt
|
|
1266
|
+
public static func == (a: FaceCaptcha.CipherError, b: FaceCaptcha.CipherError) -> Swift.Bool
|
|
1267
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1268
|
+
public var hashValue: Swift.Int {
|
|
1269
|
+
get
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
public protocol Cipher : AnyObject {
|
|
1273
|
+
var keySize: Swift.Int { get }
|
|
1274
|
+
func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1275
|
+
func encrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1276
|
+
func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1277
|
+
func decrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1278
|
+
}
|
|
1279
|
+
extension FaceCaptcha.Cipher {
|
|
1280
|
+
public func encrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1281
|
+
public func decrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1282
|
+
}
|
|
1283
|
+
@inlinable internal func rotateLeft(_ value: Swift.UInt8, by: Swift.UInt8) -> Swift.UInt8 {
|
|
1284
|
+
((value << by) & 0xff) | (value >> (8 - by))
|
|
1285
|
+
}
|
|
1286
|
+
@inlinable internal func rotateLeft(_ value: Swift.UInt16, by: Swift.UInt16) -> Swift.UInt16 {
|
|
1287
|
+
((value << by) & 0xffff) | (value >> (16 - by))
|
|
1288
|
+
}
|
|
1289
|
+
@inlinable internal func rotateLeft(_ value: Swift.UInt32, by: Swift.UInt32) -> Swift.UInt32 {
|
|
1290
|
+
((value << by) & 0xffffffff) | (value >> (32 - by))
|
|
1291
|
+
}
|
|
1292
|
+
@inlinable internal func rotateLeft(_ value: Swift.UInt64, by: Swift.UInt64) -> Swift.UInt64 {
|
|
1293
|
+
(value << by) | (value >> (64 - by))
|
|
1294
|
+
}
|
|
1295
|
+
@inlinable internal func rotateRight(_ value: Swift.UInt16, by: Swift.UInt16) -> Swift.UInt16 {
|
|
1296
|
+
(value >> by) | (value << (16 - by))
|
|
1297
|
+
}
|
|
1298
|
+
@inlinable internal func rotateRight(_ value: Swift.UInt32, by: Swift.UInt32) -> Swift.UInt32 {
|
|
1299
|
+
(value >> by) | (value << (32 - by))
|
|
1300
|
+
}
|
|
1301
|
+
@inlinable internal func rotateRight(_ value: Swift.UInt64, by: Swift.UInt64) -> Swift.UInt64 {
|
|
1302
|
+
((value >> by) | (value << (64 - by)))
|
|
1303
|
+
}
|
|
1304
|
+
@inlinable internal func reversed(_ uint8: Swift.UInt8) -> Swift.UInt8 {
|
|
1305
|
+
var v = uint8
|
|
1306
|
+
v = (v & 0xf0) >> 4 | (v & 0x0f) << 4
|
|
1307
|
+
v = (v & 0xcc) >> 2 | (v & 0x33) << 2
|
|
1308
|
+
v = (v & 0xaa) >> 1 | (v & 0x55) << 1
|
|
1309
|
+
return v
|
|
1310
|
+
}
|
|
1311
|
+
@inlinable internal func reversed(_ uint32: Swift.UInt32) -> Swift.UInt32 {
|
|
1312
|
+
var v = uint32
|
|
1313
|
+
v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1)
|
|
1314
|
+
v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2)
|
|
1315
|
+
v = ((v >> 4) & 0x0f0f0f0f) | ((v & 0x0f0f0f0f) << 4)
|
|
1316
|
+
v = ((v >> 8) & 0x00ff00ff) | ((v & 0x00ff00ff) << 8)
|
|
1317
|
+
v = ((v >> 16) & 0xffff) | ((v & 0xffff) << 16)
|
|
1318
|
+
return v
|
|
1319
|
+
}
|
|
1320
|
+
@inlinable internal func xor<T, V>(_ left: T, _ right: V) -> Swift.ArraySlice<Swift.UInt8> where T : Swift.RandomAccessCollection, V : Swift.RandomAccessCollection, T.Element == Swift.UInt8, T.Index == Swift.Int, V.Element == Swift.UInt8, V.Index == Swift.Int {
|
|
1321
|
+
return xor(left, right).slice
|
|
1322
|
+
}
|
|
1323
|
+
@inlinable internal func xor<T, V>(_ left: T, _ right: V) -> Swift.Array<Swift.UInt8> where T : Swift.RandomAccessCollection, V : Swift.RandomAccessCollection, T.Element == Swift.UInt8, T.Index == Swift.Int, V.Element == Swift.UInt8, V.Index == Swift.Int {
|
|
1324
|
+
let length = Swift.min(left.count, right.count)
|
|
1325
|
+
|
|
1326
|
+
let buf = UnsafeMutablePointer<UInt8>.allocate(capacity: length)
|
|
1327
|
+
buf.initialize(repeating: 0, count: length)
|
|
1328
|
+
defer {
|
|
1329
|
+
buf.deinitialize(count: length)
|
|
1330
|
+
buf.deallocate()
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
// xor
|
|
1334
|
+
for i in 0..<length {
|
|
1335
|
+
buf[i] = left[left.startIndex.advanced(by: i)] ^ right[right.startIndex.advanced(by: i)]
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
return Array(UnsafeBufferPointer(start: buf, count: length))
|
|
1339
|
+
}
|
|
1340
|
+
@inline(__always) @inlinable internal func bitPadding(to data: inout Swift.Array<Swift.UInt8>, blockSize: Swift.Int, allowance: Swift.Int = 0) {
|
|
1341
|
+
let msgLength = data.count
|
|
1342
|
+
// Step 1. Append Padding Bits
|
|
1343
|
+
// append one bit (UInt8 with one bit) to message
|
|
1344
|
+
data.append(0x80)
|
|
1345
|
+
|
|
1346
|
+
// Step 2. append "0" bit until message length in bits ≡ 448 (mod 512)
|
|
1347
|
+
let max = blockSize - allowance // 448, 986
|
|
1348
|
+
if msgLength % blockSize < max { // 448
|
|
1349
|
+
data += Array<UInt8>(repeating: 0, count: max - 1 - (msgLength % blockSize))
|
|
1350
|
+
} else {
|
|
1351
|
+
data += Array<UInt8>(repeating: 0, count: blockSize + max - 1 - (msgLength % blockSize))
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
final public class Poly1305 : FaceCaptcha.Authenticator {
|
|
1355
|
+
public enum Error : Swift.Error {
|
|
1356
|
+
case authenticateError
|
|
1357
|
+
public static func == (a: FaceCaptcha.Poly1305.Error, b: FaceCaptcha.Poly1305.Error) -> Swift.Bool
|
|
1358
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1359
|
+
public var hashValue: Swift.Int {
|
|
1360
|
+
get
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
public static let blockSize: Swift.Int
|
|
1364
|
+
public init(key: Swift.Array<Swift.UInt8>)
|
|
1365
|
+
final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
|
|
1366
|
+
@objc deinit
|
|
1367
|
+
}
|
|
1368
|
+
public protocol Liveness3DDelegate : AnyObject {
|
|
1369
|
+
func handleLiveness3DValidation(validateModel: FaceCaptcha.Liveness3DSuccess)
|
|
1370
|
+
func handleLiveness3DError(error: FaceCaptcha.Liveness3DError)
|
|
1371
|
+
}
|
|
1372
|
+
extension Swift.Array {
|
|
1373
|
+
@inlinable internal init(reserveCapacity: Swift.Int) {
|
|
1374
|
+
self = Array<Element>()
|
|
1375
|
+
self.reserveCapacity(reserveCapacity)
|
|
1376
|
+
}
|
|
1377
|
+
@inlinable internal var slice: Swift.ArraySlice<Element> {
|
|
1378
|
+
get {
|
|
1379
|
+
self[self.startIndex ..< self.endIndex]
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
extension Swift.Array where Element == Swift.UInt8 {
|
|
1384
|
+
public init(hex: Swift.String)
|
|
1385
|
+
public func toHexString() -> Swift.String
|
|
1386
|
+
}
|
|
1387
|
+
extension Swift.Array where Element == Swift.UInt8 {
|
|
1388
|
+
@available(*, deprecated)
|
|
1389
|
+
public func chunks(size chunksize: Swift.Int) -> Swift.Array<Swift.Array<Element>>
|
|
1390
|
+
public func md5() -> [Element]
|
|
1391
|
+
public func sha1() -> [Element]
|
|
1392
|
+
public func sha224() -> [Element]
|
|
1393
|
+
public func sha256() -> [Element]
|
|
1394
|
+
public func sha384() -> [Element]
|
|
1395
|
+
public func sha512() -> [Element]
|
|
1396
|
+
public func sha2(_ variant: FaceCaptcha.SHA2.Variant) -> [Element]
|
|
1397
|
+
public func sha3(_ variant: FaceCaptcha.SHA3.Variant) -> [Element]
|
|
1398
|
+
public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
|
|
1399
|
+
public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
|
|
1400
|
+
public func crc16(seed: Swift.UInt16? = nil) -> Swift.UInt16
|
|
1401
|
+
public func encrypt(cipher: FaceCaptcha.Cipher) throws -> [Element]
|
|
1402
|
+
public func decrypt(cipher: FaceCaptcha.Cipher) throws -> [Element]
|
|
1403
|
+
public func authenticate<A>(with authenticator: A) throws -> [Element] where A : FaceCaptcha.Authenticator
|
|
1404
|
+
}
|
|
1405
|
+
public struct FCCaptchaModel {
|
|
1406
|
+
}
|
|
1407
|
+
extension Swift.Collection where Self.Element == Swift.UInt8, Self.Index == Swift.Int {
|
|
1408
|
+
@inlinable internal func toUInt32Array() -> Swift.Array<Swift.UInt32> {
|
|
1409
|
+
guard !isEmpty else {
|
|
1410
|
+
return []
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
let c = strideCount(from: startIndex, to: endIndex, by: 4)
|
|
1414
|
+
return Array<UInt32>(unsafeUninitializedCapacity: c) { buf, count in
|
|
1415
|
+
var counter = 0
|
|
1416
|
+
for idx in stride(from: startIndex, to: endIndex, by: 4) {
|
|
1417
|
+
let val = UInt32(bytes: self, fromIndex: idx).bigEndian
|
|
1418
|
+
buf[counter] = val
|
|
1419
|
+
counter += 1
|
|
1420
|
+
}
|
|
1421
|
+
count = counter
|
|
1422
|
+
assert(counter == c)
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
@inlinable internal func toUInt64Array() -> Swift.Array<Swift.UInt64> {
|
|
1426
|
+
guard !isEmpty else {
|
|
1427
|
+
return []
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
let c = strideCount(from: startIndex, to: endIndex, by: 8)
|
|
1431
|
+
return Array<UInt64>(unsafeUninitializedCapacity: c) { buf, count in
|
|
1432
|
+
var counter = 0
|
|
1433
|
+
for idx in stride(from: startIndex, to: endIndex, by: 8) {
|
|
1434
|
+
let val = UInt64(bytes: self, fromIndex: idx).bigEndian
|
|
1435
|
+
buf[counter] = val
|
|
1436
|
+
counter += 1
|
|
1437
|
+
}
|
|
1438
|
+
count = counter
|
|
1439
|
+
assert(counter == c)
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
@usableFromInline
|
|
1444
|
+
internal func strideCount(from: Swift.Int, to: Swift.Int, by: Swift.Int) -> Swift.Int
|
|
1445
|
+
public struct FCChallengeModel {
|
|
1446
|
+
}
|
|
1447
|
+
public struct FCSessionModel {
|
|
1448
|
+
public var appkey: Swift.String?
|
|
1449
|
+
}
|
|
1450
|
+
public struct FCSession3DModel {
|
|
1451
|
+
public let sessionToken: Swift.String?
|
|
1452
|
+
}
|
|
1453
|
+
public struct FCInitializationModel {
|
|
1454
|
+
public var productionKey: Swift.String?
|
|
1455
|
+
}
|
|
1456
|
+
@usableFromInline
|
|
1457
|
+
final internal class StreamDecryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
1458
|
+
@usableFromInline
|
|
1459
|
+
final internal let blockSize: Swift.Int
|
|
1460
|
+
@usableFromInline
|
|
1461
|
+
final internal var worker: FaceCaptcha.CipherModeWorker
|
|
1462
|
+
@usableFromInline
|
|
1463
|
+
final internal let padding: FaceCaptcha.Padding
|
|
1464
|
+
@usableFromInline
|
|
1465
|
+
final internal var accumulated: [Swift.UInt8]
|
|
1466
|
+
@usableFromInline
|
|
1467
|
+
final internal var lastBlockRemainder: Swift.Int
|
|
1468
|
+
@usableFromInline
|
|
1469
|
+
internal init(blockSize: Swift.Int, padding: FaceCaptcha.Padding, _ worker: FaceCaptcha.CipherModeWorker) throws
|
|
1470
|
+
@inlinable final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool) throws -> Swift.Array<Swift.UInt8> {
|
|
1471
|
+
self.accumulated += bytes
|
|
1472
|
+
|
|
1473
|
+
let toProcess = self.accumulated.prefix(max(self.accumulated.count - self.worker.additionalBufferSize, 0))
|
|
1474
|
+
|
|
1475
|
+
if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true {
|
|
1476
|
+
// will truncate suffix if needed
|
|
1477
|
+
try finalizingWorker.willDecryptLast(bytes: self.accumulated.slice)
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
var processedBytesCount = 0
|
|
1481
|
+
var plaintext = Array<UInt8>(reserveCapacity: bytes.count + self.worker.additionalBufferSize)
|
|
1482
|
+
for chunk in toProcess.batched(by: self.blockSize) {
|
|
1483
|
+
plaintext += self.worker.decrypt(block: chunk)
|
|
1484
|
+
processedBytesCount += chunk.count
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true {
|
|
1488
|
+
plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice))
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
// omit unecessary calculation if not needed
|
|
1492
|
+
if self.padding != .noPadding {
|
|
1493
|
+
self.lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: self.blockSize).remainder
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
if isLast {
|
|
1497
|
+
// CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't.
|
|
1498
|
+
plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize - self.lastBlockRemainder)
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
self.accumulated.removeFirst(processedBytesCount) // super-slow
|
|
1502
|
+
|
|
1503
|
+
if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true {
|
|
1504
|
+
plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice))
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
return plaintext
|
|
1508
|
+
}
|
|
1509
|
+
@inlinable final public func seek(to position: Swift.Int) throws {
|
|
1510
|
+
guard var worker = self.worker as? SeekableModeWorker else {
|
|
1511
|
+
fatalError("Not supported")
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
try worker.seek(to: position)
|
|
1515
|
+
self.worker = worker
|
|
1516
|
+
}
|
|
1517
|
+
@objc @usableFromInline
|
|
1518
|
+
deinit
|
|
1519
|
+
}
|
|
1520
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor(unsafe) public class CameraPreviewView : UIKit.UIView {
|
|
1521
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public class var layerClass: Swift.AnyClass {
|
|
1522
|
+
@_Concurrency.MainActor(unsafe) @objc get
|
|
1523
|
+
}
|
|
1524
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect)
|
|
1525
|
+
@_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
1526
|
+
@objc deinit
|
|
1527
|
+
}
|
|
1528
|
+
@_specialize(exported: false, kind: full, where T == Swift.Int)
|
|
1529
|
+
@_specialize(exported: false, kind: full, where T == Swift.UInt)
|
|
1530
|
+
@_specialize(exported: false, kind: full, where T == Swift.UInt8)
|
|
1531
|
+
@_specialize(exported: false, kind: full, where T == Swift.UInt16)
|
|
1532
|
+
@_specialize(exported: false, kind: full, where T == Swift.UInt32)
|
|
1533
|
+
@_specialize(exported: false, kind: full, where T == Swift.UInt64)
|
|
1534
|
+
@inlinable internal func arrayOfBytes<T>(value: T, length totalBytes: Swift.Int = MemoryLayout<T>.size) -> Swift.Array<Swift.UInt8> where T : Swift.FixedWidthInteger {
|
|
1535
|
+
let valuePointer = UnsafeMutablePointer<T>.allocate(capacity: 1)
|
|
1536
|
+
valuePointer.pointee = value
|
|
1537
|
+
|
|
1538
|
+
let bytesPointer = UnsafeMutablePointer<UInt8>(OpaquePointer(valuePointer))
|
|
1539
|
+
var bytes = Array<UInt8>(repeating: 0, count: totalBytes)
|
|
1540
|
+
for j in 0..<min(MemoryLayout<T>.size, totalBytes) {
|
|
1541
|
+
bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
valuePointer.deinitialize(count: 1)
|
|
1545
|
+
valuePointer.deallocate()
|
|
1546
|
+
|
|
1547
|
+
return bytes
|
|
1548
|
+
}
|
|
1549
|
+
extension UIKit.UIColor {
|
|
1550
|
+
public static let backgroundDark: UIKit.UIColor
|
|
1551
|
+
public static let backgroundLight: UIKit.UIColor
|
|
1552
|
+
public static let retryScreenHeaderTextColorLight: UIKit.UIColor
|
|
1553
|
+
public static let retryScreenContentTextColorLight: UIKit.UIColor
|
|
1554
|
+
public static let retryScreenHeaderTextColorDark: UIKit.UIColor
|
|
1555
|
+
public static let resultScreenHeaderTextColorLight: UIKit.UIColor
|
|
1556
|
+
public static let resultScreenHeaderTextColorDark: UIKit.UIColor
|
|
1557
|
+
convenience public init(hex: Swift.String)
|
|
1558
|
+
}
|
|
1559
|
+
public struct OFB : FaceCaptcha.BlockMode {
|
|
1560
|
+
public enum Error : Swift.Error {
|
|
1561
|
+
case invalidInitializationVector
|
|
1562
|
+
public static func == (a: FaceCaptcha.OFB.Error, b: FaceCaptcha.OFB.Error) -> Swift.Bool
|
|
1563
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1564
|
+
public var hashValue: Swift.Int {
|
|
1565
|
+
get
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
1569
|
+
public let customBlockSize: Swift.Int?
|
|
1570
|
+
public init(iv: Swift.Array<Swift.UInt8>)
|
|
1571
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1572
|
+
}
|
|
1573
|
+
extension FaceCaptcha.HMAC {
|
|
1574
|
+
convenience public init(key: Swift.String, variant: FaceCaptcha.HMAC.Variant = .md5) throws
|
|
1575
|
+
}
|
|
1576
|
+
public enum Bit : Swift.Int {
|
|
1577
|
+
case zero
|
|
1578
|
+
case one
|
|
1579
|
+
public init?(rawValue: Swift.Int)
|
|
1580
|
+
public typealias RawValue = Swift.Int
|
|
1581
|
+
public var rawValue: Swift.Int {
|
|
1582
|
+
get
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
extension FaceCaptcha.Bit {
|
|
1586
|
+
@inlinable internal func inverted() -> FaceCaptcha.Bit {
|
|
1587
|
+
self == .zero ? .one : .zero
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
public protocol AEAD {
|
|
1591
|
+
static var kLen: Swift.Int { get }
|
|
1592
|
+
static var ivRange: Swift.Range<Swift.Int> { get }
|
|
1593
|
+
}
|
|
1594
|
+
extension FaceCaptcha.AES {
|
|
1595
|
+
convenience public init(key: Swift.String, iv: Swift.String, padding: FaceCaptcha.Padding = .pkcs7) throws
|
|
1596
|
+
}
|
|
1597
|
+
@_hasMissingDesignatedInitializers public class FCCipher {
|
|
1598
|
+
public static let key: [Swift.UInt8]
|
|
1599
|
+
public static let iv: [Swift.UInt8]
|
|
1600
|
+
public static let key_string: Swift.String
|
|
1601
|
+
public static let key_iv_string: Swift.String
|
|
1602
|
+
public static func padMsg(_ source: Swift.String) -> Swift.String
|
|
1603
|
+
public static func padKey(_ source: Swift.String) -> Swift.String
|
|
1604
|
+
@objc deinit
|
|
1605
|
+
}
|
|
1606
|
+
extension FaceCaptcha.FCCipher {
|
|
1607
|
+
public static func aesEncrypt(_ str: Swift.String, _ appKey: Swift.String) -> Swift.String
|
|
1608
|
+
public static func aesDecrypt(_ str: Swift.String, _ appKey: Swift.String) -> Swift.String
|
|
1609
|
+
}
|
|
1610
|
+
extension Swift.UInt32 {
|
|
1611
|
+
@_specialize(exported: false, kind: full, where T == Swift.ArraySlice<Swift.UInt8>)
|
|
1612
|
+
@inlinable internal init<T>(bytes: T, fromIndex index: T.Index) where T : Swift.Collection, T.Element == Swift.UInt8, T.Index == Swift.Int {
|
|
1613
|
+
if bytes.isEmpty {
|
|
1614
|
+
self = 0
|
|
1615
|
+
return
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
let count = bytes.count
|
|
1619
|
+
|
|
1620
|
+
let val0 = count > 0 ? UInt32(bytes[index.advanced(by: 0)]) << 24 : 0
|
|
1621
|
+
let val1 = count > 1 ? UInt32(bytes[index.advanced(by: 1)]) << 16 : 0
|
|
1622
|
+
let val2 = count > 2 ? UInt32(bytes[index.advanced(by: 2)]) << 8 : 0
|
|
1623
|
+
let val3 = count > 3 ? UInt32(bytes[index.advanced(by: 3)]) : 0
|
|
1624
|
+
|
|
1625
|
+
self = val0 | val1 | val2 | val3
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
public typealias DocumentscopyConfirmationSheetVisibility = FaceCaptcha.Visibility
|
|
1629
|
+
public protocol DocumentscopyCustomView : UIKit.UIView {
|
|
1630
|
+
var cameraPreview: FaceCaptcha.DocumentscopyCameraPreviewView! { get }
|
|
1631
|
+
var cameraMask: UIKit.UIView! { get }
|
|
1632
|
+
var backButton: UIKit.UIButton! { get }
|
|
1633
|
+
var closeButton: UIKit.UIButton! { get }
|
|
1634
|
+
var backIndicatorView: UIKit.UIView! { get }
|
|
1635
|
+
var frontIndicatorView: UIKit.UIView! { get }
|
|
1636
|
+
var instructionLabel: UIKit.UILabel! { get }
|
|
1637
|
+
var cameraVisualizer: UIKit.UIView! { get }
|
|
1638
|
+
var previewImageView: UIKit.UIImageView! { get }
|
|
1639
|
+
var captureButton: UIKit.UIButton! { get }
|
|
1640
|
+
var usePictureButton: UIKit.UIButton! { get }
|
|
1641
|
+
var takeNewPictureButton: UIKit.UIButton! { get }
|
|
1642
|
+
func displayConfirmationSheet(visibility: FaceCaptcha.DocumentscopyConfirmationSheetVisibility, animated: Swift.Bool)
|
|
1643
|
+
func setFocus(to focusElement: FaceCaptcha.DocumentscopyFocusIndicator, animated: Swift.Bool)
|
|
1644
|
+
func setUsePictureButtonTitle(to newTitle: Swift.String)
|
|
1645
|
+
}
|
|
1646
|
+
public enum DocumentscopyResultType {
|
|
1647
|
+
case success
|
|
1648
|
+
case tryAgain
|
|
1649
|
+
case error(FaceCaptcha.DocumentscopyError)
|
|
1650
|
+
}
|
|
1651
|
+
public typealias DocumentscopyCustomCameraPermissionView = FaceCaptcha.CustomCameraPermissionView
|
|
1652
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class DocumentscopyViewController : UIKit.UINavigationController {
|
|
1653
|
+
@_Concurrency.MainActor(unsafe) public init(appKey: Swift.String, baseURL: Swift.String, delegate: FaceCaptcha.DocumentscopyDelegate, customInstructionView: FaceCaptcha.DocumentscopyCustomInstructionView? = nil, customView: FaceCaptcha.DocumentscopyCustomView? = nil, customCameraPermissionView: FaceCaptcha.DocumentscopyCustomCameraPermissionView? = nil, customLoadingView: FaceCaptcha.DocumentscopyCustomLoadingView? = nil, customResultView: FaceCaptcha.DocumentscopyCustomResultView? = nil)
|
|
1654
|
+
@objc deinit
|
|
1655
|
+
}
|
|
1656
|
+
extension FaceCaptcha.DocumentscopyViewController : UIKit.UIGestureRecognizerDelegate {
|
|
1657
|
+
@_Concurrency.MainActor(unsafe) @objc dynamic public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIKit.UIGestureRecognizer) -> Swift.Bool
|
|
1658
|
+
}
|
|
1659
|
+
final public class OCB : FaceCaptcha.BlockMode {
|
|
1660
|
+
public enum Mode {
|
|
1661
|
+
case combined
|
|
1662
|
+
case detached
|
|
1663
|
+
public static func == (a: FaceCaptcha.OCB.Mode, b: FaceCaptcha.OCB.Mode) -> Swift.Bool
|
|
1664
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1665
|
+
public var hashValue: Swift.Int {
|
|
1666
|
+
get
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
final public let options: FaceCaptcha.BlockModeOption
|
|
1670
|
+
public enum Error : Swift.Error {
|
|
1671
|
+
case invalidNonce
|
|
1672
|
+
case fail
|
|
1673
|
+
public static func == (a: FaceCaptcha.OCB.Error, b: FaceCaptcha.OCB.Error) -> Swift.Bool
|
|
1674
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1675
|
+
public var hashValue: Swift.Int {
|
|
1676
|
+
get
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
final public let customBlockSize: Swift.Int?
|
|
1680
|
+
final public var authenticationTag: Swift.Array<Swift.UInt8>?
|
|
1681
|
+
public init(nonce N: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, tagLength: Swift.Int = 16, mode: FaceCaptcha.OCB.Mode = .detached)
|
|
1682
|
+
@inlinable convenience public init(nonce N: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, mode: FaceCaptcha.OCB.Mode = .detached) {
|
|
1683
|
+
self.init(nonce: N, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: authenticationTag.count, mode: mode)
|
|
1684
|
+
self.authenticationTag = authenticationTag
|
|
1685
|
+
}
|
|
1686
|
+
final public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1687
|
+
@objc deinit
|
|
1688
|
+
}
|
|
1689
|
+
public struct HKDF {
|
|
1690
|
+
public enum Error : Swift.Error {
|
|
1691
|
+
case invalidInput
|
|
1692
|
+
case derivedKeyTooLong
|
|
1693
|
+
public static func == (a: FaceCaptcha.HKDF.Error, b: FaceCaptcha.HKDF.Error) -> Swift.Bool
|
|
1694
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1695
|
+
public var hashValue: Swift.Int {
|
|
1696
|
+
get
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>? = nil, info: Swift.Array<Swift.UInt8>? = nil, keyLength: Swift.Int? = nil, variant: FaceCaptcha.HMAC.Variant = .sha256) throws
|
|
1700
|
+
public func calculate() throws -> Swift.Array<Swift.UInt8>
|
|
1701
|
+
}
|
|
1702
|
+
public struct CFB : FaceCaptcha.BlockMode {
|
|
1703
|
+
public enum Error : Swift.Error {
|
|
1704
|
+
case invalidInitializationVector
|
|
1705
|
+
public static func == (a: FaceCaptcha.CFB.Error, b: FaceCaptcha.CFB.Error) -> Swift.Bool
|
|
1706
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1707
|
+
public var hashValue: Swift.Int {
|
|
1708
|
+
get
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
public enum SegmentSize : Swift.Int {
|
|
1712
|
+
case cfb8
|
|
1713
|
+
case cfb128
|
|
1714
|
+
public init?(rawValue: Swift.Int)
|
|
1715
|
+
public typealias RawValue = Swift.Int
|
|
1716
|
+
public var rawValue: Swift.Int {
|
|
1717
|
+
get
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
1721
|
+
public let customBlockSize: Swift.Int?
|
|
1722
|
+
public init(iv: Swift.Array<Swift.UInt8>, segmentSize: FaceCaptcha.CFB.SegmentSize = .cfb128)
|
|
1723
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1724
|
+
}
|
|
1725
|
+
extension FaceCaptcha.PKCS5 {
|
|
1726
|
+
public struct PBKDF2 {
|
|
1727
|
+
public enum Error : Swift.Error {
|
|
1728
|
+
case invalidInput
|
|
1729
|
+
case derivedKeyTooLong
|
|
1730
|
+
public static func == (a: FaceCaptcha.PKCS5.PBKDF2.Error, b: FaceCaptcha.PKCS5.PBKDF2.Error) -> Swift.Bool
|
|
1731
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1732
|
+
public var hashValue: Swift.Int {
|
|
1733
|
+
get
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, iterations: Swift.Int = 4096, keyLength: Swift.Int? = nil, variant: FaceCaptcha.HMAC.Variant = .sha256) throws
|
|
1737
|
+
public func calculate() throws -> Swift.Array<Swift.UInt8>
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
public enum FaceCaptchaError {
|
|
1741
|
+
case invalidAppKey
|
|
1742
|
+
case certifaceOff
|
|
1743
|
+
case noCameraPermission
|
|
1744
|
+
case noInternetConnection
|
|
1745
|
+
case phoneCallInProgress
|
|
1746
|
+
case validationError
|
|
1747
|
+
case challengeInterrupted
|
|
1748
|
+
case requestError
|
|
1749
|
+
case errorCameraSetup
|
|
1750
|
+
case errorCapturePicture
|
|
1751
|
+
public static func == (a: FaceCaptcha.FaceCaptchaError, b: FaceCaptcha.FaceCaptchaError) -> Swift.Bool
|
|
1752
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1753
|
+
public var hashValue: Swift.Int {
|
|
1754
|
+
get
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
public enum PKCS5 {
|
|
1758
|
+
}
|
|
1759
|
+
public protocol Updatable {
|
|
1760
|
+
mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool) throws -> Swift.Array<Swift.UInt8>
|
|
1761
|
+
mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool, output: (_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Void) throws
|
|
1762
|
+
}
|
|
1763
|
+
extension FaceCaptcha.Updatable {
|
|
1764
|
+
@inlinable public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false, output: (_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Void) throws {
|
|
1765
|
+
let processed = try update(withBytes: bytes, isLast: isLast)
|
|
1766
|
+
if !processed.isEmpty {
|
|
1767
|
+
output(processed)
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
@inlinable public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
1771
|
+
try self.update(withBytes: bytes, isLast: isLast)
|
|
1772
|
+
}
|
|
1773
|
+
@inlinable public mutating func update(withBytes bytes: Swift.Array<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
1774
|
+
try self.update(withBytes: bytes.slice, isLast: isLast)
|
|
1775
|
+
}
|
|
1776
|
+
@inlinable public mutating func update(withBytes bytes: Swift.Array<Swift.UInt8>, isLast: Swift.Bool = false, output: (_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Void) throws {
|
|
1777
|
+
try self.update(withBytes: bytes.slice, isLast: isLast, output: output)
|
|
1778
|
+
}
|
|
1779
|
+
@inlinable public mutating func finish(withBytes bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8> {
|
|
1780
|
+
try self.update(withBytes: bytes, isLast: true)
|
|
1781
|
+
}
|
|
1782
|
+
@inlinable public mutating func finish(withBytes bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8> {
|
|
1783
|
+
try self.finish(withBytes: bytes.slice)
|
|
1784
|
+
}
|
|
1785
|
+
@inlinable public mutating func finish() throws -> Swift.Array<Swift.UInt8> {
|
|
1786
|
+
try self.update(withBytes: [], isLast: true)
|
|
1787
|
+
}
|
|
1788
|
+
@inlinable public mutating func finish(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, output: (_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Void) throws {
|
|
1789
|
+
let processed = try update(withBytes: bytes, isLast: true)
|
|
1790
|
+
if !processed.isEmpty {
|
|
1791
|
+
output(processed)
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
@inlinable public mutating func finish(withBytes bytes: Swift.Array<Swift.UInt8>, output: (_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Void) throws {
|
|
1795
|
+
try self.finish(withBytes: bytes.slice, output: output)
|
|
1796
|
+
}
|
|
1797
|
+
@inlinable public mutating func finish(output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws {
|
|
1798
|
+
try self.finish(withBytes: [], output: output)
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
public enum ResultAnimationStyle {
|
|
1802
|
+
case blob
|
|
1803
|
+
case spinner(FaceCaptcha.SpinnerAnimationCustomization)
|
|
1804
|
+
case custom(FaceCaptcha.CustomResultAnimationDelegate)
|
|
1805
|
+
}
|
|
1806
|
+
public protocol CustomResultAnimationDelegate {
|
|
1807
|
+
func createActivityIndicatorView() -> UIKit.UIView?
|
|
1808
|
+
func createSuccessAnimationView() -> UIKit.UIView?
|
|
1809
|
+
}
|
|
1810
|
+
public struct SpinnerAnimationCustomization {
|
|
1811
|
+
public init(spinnerColor: UIKit.UIColor, indicatorForegroundColor: UIKit.UIColor, indicatorBackgroundColor: UIKit.UIColor)
|
|
1812
|
+
}
|
|
1813
|
+
extension FaceCaptcha.ChaCha20 {
|
|
1814
|
+
convenience public init(key: Swift.String, iv: Swift.String) throws
|
|
1815
|
+
}
|
|
1816
|
+
public struct Liveness3DUser {
|
|
1817
|
+
public init(appKey: Swift.String, environment: FaceCaptcha.Environment3D = .HML, defaultTheme: FaceCaptcha.Liveness3DTheme? = nil, lowLightTheme: FaceCaptcha.Liveness3DTheme? = nil, texts: [Swift.String : Swift.String]? = nil)
|
|
1818
|
+
}
|
|
1819
|
+
public enum Environment3D {
|
|
1820
|
+
case HML
|
|
1821
|
+
case PRD
|
|
1822
|
+
public static func == (a: FaceCaptcha.Environment3D, b: FaceCaptcha.Environment3D) -> Swift.Bool
|
|
1823
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1824
|
+
public var hashValue: Swift.Int {
|
|
1825
|
+
get
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
public enum Liveness3DThemeType : Swift.Int {
|
|
1829
|
+
case light, dark
|
|
1830
|
+
public init?(rawValue: Swift.Int)
|
|
1831
|
+
public typealias RawValue = Swift.Int
|
|
1832
|
+
public var rawValue: Swift.Int {
|
|
1833
|
+
get
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
public struct Liveness3DTheme {
|
|
1837
|
+
public init(_ type: FaceCaptcha.Liveness3DThemeType)
|
|
1838
|
+
public var guidanceCustomizationBackgroundColors: [UIKit.UIColor]?
|
|
1839
|
+
public var guidanceCustomizationForegroundColor: UIKit.UIColor?
|
|
1840
|
+
public var guidanceCustomizationHeaderFont: UIKit.UIFont?
|
|
1841
|
+
public var guidanceCustomizationSubtextFont: UIKit.UIFont?
|
|
1842
|
+
public var guidanceCustomizationReadyScreenHeaderFont: UIKit.UIFont?
|
|
1843
|
+
public var guidanceCustomizationReadyScreenHeaderTextColor: UIKit.UIColor?
|
|
1844
|
+
public var guidanceCustomizationReadyScreenHeaderAttributedString: Foundation.NSAttributedString?
|
|
1845
|
+
public var guidanceCustomizationReadyScreenSubtextFont: UIKit.UIFont?
|
|
1846
|
+
public var guidanceCustomizationReadyScreenSubtextTextColor: UIKit.UIColor?
|
|
1847
|
+
public var guidanceCustomizationReadyScreenSubtextAttributedString: Foundation.NSAttributedString?
|
|
1848
|
+
public var guidanceCustomizationRetryScreenHeaderFont: UIKit.UIFont?
|
|
1849
|
+
public var guidanceCustomizationRetryScreenHeaderTextColor: UIKit.UIColor?
|
|
1850
|
+
public var guidanceCustomizationRetryScreenHeaderAttributedString: Foundation.NSAttributedString?
|
|
1851
|
+
public var guidanceCustomizationRetryScreenSubtextFont: UIKit.UIFont?
|
|
1852
|
+
public var guidanceCustomizationRetryScreenSubtextTextColor: UIKit.UIColor?
|
|
1853
|
+
public var guidanceCustomizationRetryScreenSubtextAttributedString: Foundation.NSAttributedString?
|
|
1854
|
+
public var guidanceCustomizationButtonFont: UIKit.UIFont?
|
|
1855
|
+
public var guidanceCustomizationButtonTextNormalColor: UIKit.UIColor?
|
|
1856
|
+
public var guidanceCustomizationButtonBackgroundNormalColor: UIKit.UIColor
|
|
1857
|
+
public var guidanceCustomizationButtonTextHighlightColor: UIKit.UIColor?
|
|
1858
|
+
public var guidanceCustomizationButtonBackgroundHighlightColor: UIKit.UIColor?
|
|
1859
|
+
public var guidanceCustomizationButtonTextDisabledColor: UIKit.UIColor?
|
|
1860
|
+
public var guidanceCustomizationButtonBackgroundDisabledColor: UIKit.UIColor
|
|
1861
|
+
public var guidanceCustomizationButtonBorderColor: UIKit.UIColor?
|
|
1862
|
+
public var guidanceCustomizationButtonBorderWidth: Swift.Int32?
|
|
1863
|
+
public var guidanceCustomizationButtonCornerRadius: Swift.Int32?
|
|
1864
|
+
public var guidanceCustomizationReadyScreenOvarFillColor: UIKit.UIColor?
|
|
1865
|
+
public var guidanceCustomizationReadyScreenTextBackgroundColor: UIKit.UIColor?
|
|
1866
|
+
public var guidanceCustomizationReadyScreenTextBackgroundCornerRadius: Swift.Int32?
|
|
1867
|
+
public var guidanceCustomizationRetryScreenImageBorderColor: UIKit.UIColor
|
|
1868
|
+
public var guidanceCustomizationRetryScreenImageBorderWidth: Swift.Int32?
|
|
1869
|
+
public var guidanceCustomizationRetryScreenImageCornerRadius: Swift.Int32?
|
|
1870
|
+
public var guidanceCustomizationRetryScreenOvarStrokeColor: UIKit.UIColor?
|
|
1871
|
+
public var resultScreenCustomizationAnimationRelativeScale: Swift.Float
|
|
1872
|
+
public var resultScreenCustomizationForegroundColor: UIKit.UIColor?
|
|
1873
|
+
public var resultScreenCustomizationBackgroundColors: [UIKit.UIColor]?
|
|
1874
|
+
public var resultScreenCustomizationActivityIndicatorColor: UIKit.UIColor
|
|
1875
|
+
public var resultScreenCustomizationCustomActivityIndicatorImage: UIKit.UIImage?
|
|
1876
|
+
public var resultScreenCustomizationCustomActivityIndicatorRotationIntervar: Swift.Int32
|
|
1877
|
+
public var resultScreenCustomizationCustomActivityIndicatorAnimation: Swift.Int
|
|
1878
|
+
public var resultScreenCustomizationShowUploadProgressBar: Swift.Bool
|
|
1879
|
+
public var resultScreenCustomizationUploadProgressFillColor: UIKit.UIColor
|
|
1880
|
+
public var resultScreenCustomizationUploadProgressTrackColor: UIKit.UIColor
|
|
1881
|
+
public var resultScreenCustomizationResultAnimationBackgroundColor: UIKit.UIColor
|
|
1882
|
+
public var resultScreenCustomizationResultAnimationForegroundColor: UIKit.UIColor
|
|
1883
|
+
public var resultScreenCustomizationResultAnimationSuccessBackgroundImage: UIKit.UIImage?
|
|
1884
|
+
public var resultScreenCustomizationResultAnimationUnSuccessBackgroundImage: Swift.Int
|
|
1885
|
+
public var resultScreenCustomizationCustomResultAnimationSuccess: Swift.Int
|
|
1886
|
+
public var resultScreenCustomizationCustomResultAnimationUnSuccess: Swift.Int
|
|
1887
|
+
public var resultScreenCustomizationCustomStaticResultAnimationSuccess: Swift.Int
|
|
1888
|
+
public var resultScreenCustomizationCustomStaticResultAnimationUnSuccess: Swift.Int
|
|
1889
|
+
public var resultScreenCustomizationMessageFont: UIKit.UIFont?
|
|
1890
|
+
public var ovarCustomizationStrokeWidth: Swift.Int32?
|
|
1891
|
+
public var ovarCustomizationStrokeColor: UIKit.UIColor
|
|
1892
|
+
public var ovarCustomizationProgressStrokeWidth: Swift.Int32?
|
|
1893
|
+
public var ovarCustomizationProgressColor1: UIKit.UIColor
|
|
1894
|
+
public var ovarCustomizationProgressColor2: UIKit.UIColor
|
|
1895
|
+
public var ovarCustomizationProgressRadialOffset: Swift.Int32?
|
|
1896
|
+
public var frameCustomizationBorderWidth: Swift.Int32?
|
|
1897
|
+
public var frameCustomizationCornerRadius: Swift.Int32
|
|
1898
|
+
public var frameCustomizationBorderColor: UIKit.UIColor?
|
|
1899
|
+
public var frameCustomizationBackgroundColor: UIKit.UIColor?
|
|
1900
|
+
public var frameCustomizationElevation: Swift.Int32?
|
|
1901
|
+
public var overlayCustomizationBackgroundColor: UIKit.UIColor?
|
|
1902
|
+
public var overlayCustomizationBrandingImage: UIKit.UIImage?
|
|
1903
|
+
public var overlayCustomizationShowBrandingImage: Swift.Bool
|
|
1904
|
+
public var feedbackCustomizationCornerRadius: Swift.Int32?
|
|
1905
|
+
public var feedbackCustomizationBackgroundColor: QuartzCore.CAGradientLayer?
|
|
1906
|
+
public var feedbackCustomizationTextColor: UIKit.UIColor?
|
|
1907
|
+
public var feedbackCustomizationTextFont: UIKit.UIFont?
|
|
1908
|
+
public var feedbackCustomizationEnablePulsatingText: Swift.Bool
|
|
1909
|
+
public var feedbackCustomizationElevation: Swift.Int?
|
|
1910
|
+
public var cancelButtonCustomizationCustomImage: UIKit.UIImage?
|
|
1911
|
+
public var cancelButtonCustomizationLocation: FaceCaptcha.Liveness3DTheme.CancelButtonLocation
|
|
1912
|
+
public var resultAnimationStyle: FaceCaptcha.ResultAnimationStyle
|
|
1913
|
+
public var resultScreenSuccessMessage: Swift.String
|
|
1914
|
+
public enum CancelButtonLocation : Swift.Int {
|
|
1915
|
+
case topLeft, topRight, disabled
|
|
1916
|
+
public init?(rawValue: Swift.Int)
|
|
1917
|
+
public typealias RawValue = Swift.Int
|
|
1918
|
+
public var rawValue: Swift.Int {
|
|
1919
|
+
get
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class DocumentscopyView : UIKit.UIView, FaceCaptcha.DocumentscopyCustomView {
|
|
1924
|
+
@_Concurrency.MainActor(unsafe) public var cameraPreview: FaceCaptcha.DocumentscopyCameraPreviewView!
|
|
1925
|
+
@_Concurrency.MainActor(unsafe) public var captureButton: UIKit.UIButton!
|
|
1926
|
+
@_Concurrency.MainActor(unsafe) public var captureButtonCorner: UIKit.UIView
|
|
1927
|
+
@_Concurrency.MainActor(unsafe) public var previewContainer: UIKit.UIView!
|
|
1928
|
+
@_Concurrency.MainActor(unsafe) public var previewImageView: UIKit.UIImageView!
|
|
1929
|
+
@_Concurrency.MainActor(unsafe) public var usePictureButton: UIKit.UIButton!
|
|
1930
|
+
@_Concurrency.MainActor(unsafe) public var takeNewPictureButton: UIKit.UIButton!
|
|
1931
|
+
@_Concurrency.MainActor(unsafe) public var instructionLabel: UIKit.UILabel!
|
|
1932
|
+
@_Concurrency.MainActor(unsafe) public var closeButton: UIKit.UIButton!
|
|
1933
|
+
@_Concurrency.MainActor(unsafe) public var backButton: UIKit.UIButton!
|
|
1934
|
+
@_Concurrency.MainActor(unsafe) public var containerConfirmation: UIKit.UIView!
|
|
1935
|
+
@_Concurrency.MainActor(unsafe) public var backIndicatorView: UIKit.UIView!
|
|
1936
|
+
@_Concurrency.MainActor(unsafe) public var frontIndicatorView: UIKit.UIView!
|
|
1937
|
+
@_Concurrency.MainActor(unsafe) public var cameraMask: UIKit.UIView!
|
|
1938
|
+
@_Concurrency.MainActor(unsafe) public var cameraVisualizer: UIKit.UIView!
|
|
1939
|
+
@_Concurrency.MainActor(unsafe) public var bottomViewConfirmationTopConstraint: UIKit.NSLayoutConstraint!
|
|
1940
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect)
|
|
1941
|
+
@objc deinit
|
|
1942
|
+
@_Concurrency.MainActor(unsafe) public func displayConfirmationSheet(visibility: FaceCaptcha.DocumentscopyConfirmationSheetVisibility, animated: Swift.Bool)
|
|
1943
|
+
@_Concurrency.MainActor(unsafe) public func setFocus(to focusElement: FaceCaptcha.DocumentscopyFocusIndicator, animated: Swift.Bool)
|
|
1944
|
+
@_Concurrency.MainActor(unsafe) public func setUsePictureButtonTitle(to newTitle: Swift.String)
|
|
1945
|
+
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
|
|
1946
|
+
}
|
|
1947
|
+
extension Foundation.Data {
|
|
1948
|
+
public func checksum() -> Swift.UInt16
|
|
1949
|
+
public func md5() -> Foundation.Data
|
|
1950
|
+
public func sha1() -> Foundation.Data
|
|
1951
|
+
public func sha224() -> Foundation.Data
|
|
1952
|
+
public func sha256() -> Foundation.Data
|
|
1953
|
+
public func sha384() -> Foundation.Data
|
|
1954
|
+
public func sha512() -> Foundation.Data
|
|
1955
|
+
public func sha3(_ variant: FaceCaptcha.SHA3.Variant) -> Foundation.Data
|
|
1956
|
+
public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Foundation.Data
|
|
1957
|
+
public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Foundation.Data
|
|
1958
|
+
public func crc16(seed: Swift.UInt16? = nil) -> Foundation.Data
|
|
1959
|
+
public func encrypt(cipher: FaceCaptcha.Cipher) throws -> Foundation.Data
|
|
1960
|
+
public func decrypt(cipher: FaceCaptcha.Cipher) throws -> Foundation.Data
|
|
1961
|
+
public func authenticate(with authenticator: FaceCaptcha.Authenticator) throws -> Foundation.Data
|
|
1962
|
+
}
|
|
1963
|
+
extension Foundation.Data {
|
|
1964
|
+
public init(hex: Swift.String)
|
|
1965
|
+
public var bytes: Swift.Array<Swift.UInt8> {
|
|
1966
|
+
get
|
|
1967
|
+
}
|
|
1968
|
+
public func toHexString() -> Swift.String
|
|
1969
|
+
}
|
|
1970
|
+
public struct PCBC : FaceCaptcha.BlockMode {
|
|
1971
|
+
public enum Error : Swift.Error {
|
|
1972
|
+
case invalidInitializationVector
|
|
1973
|
+
public static func == (a: FaceCaptcha.PCBC.Error, b: FaceCaptcha.PCBC.Error) -> Swift.Bool
|
|
1974
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1975
|
+
public var hashValue: Swift.Int {
|
|
1976
|
+
get
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
1980
|
+
public let customBlockSize: Swift.Int?
|
|
1981
|
+
public init(iv: Swift.Array<Swift.UInt8>)
|
|
1982
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1983
|
+
}
|
|
1984
|
+
public struct CTR {
|
|
1985
|
+
public enum Error : Swift.Error {
|
|
1986
|
+
case invalidInitializationVector
|
|
1987
|
+
public static func == (a: FaceCaptcha.CTR.Error, b: FaceCaptcha.CTR.Error) -> Swift.Bool
|
|
1988
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1989
|
+
public var hashValue: Swift.Int {
|
|
1990
|
+
get
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
public let options: FaceCaptcha.BlockModeOption
|
|
1994
|
+
public let customBlockSize: Swift.Int?
|
|
1995
|
+
public init(iv: Swift.Array<Swift.UInt8>, counter: Swift.Int = 0)
|
|
1996
|
+
public func worker(blockSize: Swift.Int, cipherOperation: @escaping FaceCaptcha.CipherOperationOnBlock, encryptionOperation: @escaping FaceCaptcha.CipherOperationOnBlock) throws -> FaceCaptcha.CipherModeWorker
|
|
1997
|
+
}
|
|
1998
|
+
@usableFromInline
|
|
1999
|
+
final internal class StreamEncryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
2000
|
+
@usableFromInline
|
|
2001
|
+
final internal let blockSize: Swift.Int
|
|
2002
|
+
@usableFromInline
|
|
2003
|
+
final internal var worker: FaceCaptcha.CipherModeWorker
|
|
2004
|
+
@usableFromInline
|
|
2005
|
+
final internal let padding: FaceCaptcha.Padding
|
|
2006
|
+
@usableFromInline
|
|
2007
|
+
final internal var lastBlockRemainder: Swift.Int
|
|
2008
|
+
@usableFromInline
|
|
2009
|
+
internal init(blockSize: Swift.Int, padding: FaceCaptcha.Padding, _ worker: FaceCaptcha.CipherModeWorker) throws
|
|
2010
|
+
@inlinable final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool) throws -> Swift.Array<Swift.UInt8> {
|
|
2011
|
+
var accumulated = Array(bytes)
|
|
2012
|
+
if isLast {
|
|
2013
|
+
// CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't.
|
|
2014
|
+
accumulated = self.padding.add(to: accumulated, blockSize: self.blockSize - self.lastBlockRemainder)
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
var encrypted = Array<UInt8>(reserveCapacity: bytes.count)
|
|
2018
|
+
for chunk in accumulated.batched(by: self.blockSize) {
|
|
2019
|
+
encrypted += self.worker.encrypt(block: chunk)
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
// omit unecessary calculation if not needed
|
|
2023
|
+
if self.padding != .noPadding {
|
|
2024
|
+
self.lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: self.blockSize).remainder
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true {
|
|
2028
|
+
encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice))
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
return encrypted
|
|
2032
|
+
}
|
|
2033
|
+
@usableFromInline
|
|
2034
|
+
final internal func seek(to: Swift.Int) throws
|
|
2035
|
+
@objc @usableFromInline
|
|
2036
|
+
deinit
|
|
2037
|
+
}
|
|
2038
|
+
public class BlockDecryptor : FaceCaptcha.Cryptor, FaceCaptcha.Updatable {
|
|
2039
|
+
@usableFromInline
|
|
2040
|
+
final internal let blockSize: Swift.Int
|
|
2041
|
+
@usableFromInline
|
|
2042
|
+
final internal let padding: FaceCaptcha.Padding
|
|
2043
|
+
@usableFromInline
|
|
2044
|
+
internal var worker: FaceCaptcha.CipherModeWorker
|
|
2045
|
+
@usableFromInline
|
|
2046
|
+
internal var accumulated: [Swift.UInt8]
|
|
2047
|
+
@usableFromInline
|
|
2048
|
+
internal init(blockSize: Swift.Int, padding: FaceCaptcha.Padding, _ worker: FaceCaptcha.CipherModeWorker) throws
|
|
2049
|
+
@inlinable public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8> {
|
|
2050
|
+
self.accumulated += bytes
|
|
2051
|
+
|
|
2052
|
+
// If a worker (eg GCM) can combine ciphertext + tag
|
|
2053
|
+
// we need to remove tag from the ciphertext.
|
|
2054
|
+
if !isLast && self.accumulated.count < self.blockSize + self.worker.additionalBufferSize {
|
|
2055
|
+
return []
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
let accumulatedWithoutSuffix: Array<UInt8>
|
|
2059
|
+
if self.worker.additionalBufferSize > 0 {
|
|
2060
|
+
// FIXME: how slow is that?
|
|
2061
|
+
accumulatedWithoutSuffix = Array(self.accumulated.prefix(self.accumulated.count - self.worker.additionalBufferSize))
|
|
2062
|
+
} else {
|
|
2063
|
+
accumulatedWithoutSuffix = self.accumulated
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
var processedBytesCount = 0
|
|
2067
|
+
var plaintext = Array<UInt8>(reserveCapacity: accumulatedWithoutSuffix.count)
|
|
2068
|
+
// Processing in a block-size manner. It's good for block modes, but bad for stream modes.
|
|
2069
|
+
for var chunk in accumulatedWithoutSuffix.batched(by: self.blockSize) {
|
|
2070
|
+
if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize {
|
|
2071
|
+
let isLastChunk = processedBytesCount + chunk.count == accumulatedWithoutSuffix.count
|
|
2072
|
+
|
|
2073
|
+
if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker {
|
|
2074
|
+
chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
if !chunk.isEmpty {
|
|
2078
|
+
plaintext += worker.decrypt(block: chunk)
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker {
|
|
2082
|
+
plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice))
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
processedBytesCount += chunk.count
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
accumulated.removeFirst(processedBytesCount) // super-slow
|
|
2089
|
+
|
|
2090
|
+
if isLast {
|
|
2091
|
+
if accumulatedWithoutSuffix.isEmpty, var finalizingWorker = worker as? FinalizingDecryptModeWorker {
|
|
2092
|
+
try finalizingWorker.willDecryptLast(bytes: self.accumulated.suffix(self.worker.additionalBufferSize))
|
|
2093
|
+
plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice))
|
|
2094
|
+
}
|
|
2095
|
+
plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize)
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
return plaintext
|
|
2099
|
+
}
|
|
2100
|
+
public func seek(to position: Swift.Int) throws
|
|
2101
|
+
@objc deinit
|
|
2102
|
+
}
|
|
2103
|
+
extension UIKit.UIView {
|
|
2104
|
+
@_Concurrency.MainActor(unsafe) public func createImageFromView() -> UIKit.UIImage
|
|
2105
|
+
}
|
|
2106
|
+
extension FaceCaptcha.DocumentscopyFocusIndicator : Swift.Equatable {}
|
|
2107
|
+
extension FaceCaptcha.DocumentscopyFocusIndicator : Swift.Hashable {}
|
|
2108
|
+
extension FaceCaptcha.SHA2.Variant : Swift.Equatable {}
|
|
2109
|
+
extension FaceCaptcha.SHA2.Variant : Swift.Hashable {}
|
|
2110
|
+
extension FaceCaptcha.Blowfish.Error : Swift.Equatable {}
|
|
2111
|
+
extension FaceCaptcha.Blowfish.Error : Swift.Hashable {}
|
|
2112
|
+
extension FaceCaptcha.CMAC.Error : Swift.Equatable {}
|
|
2113
|
+
extension FaceCaptcha.CMAC.Error : Swift.Hashable {}
|
|
2114
|
+
extension FaceCaptcha.HMAC.Error : Swift.Equatable {}
|
|
2115
|
+
extension FaceCaptcha.HMAC.Error : Swift.Hashable {}
|
|
2116
|
+
extension FaceCaptcha.HMAC.Variant : Swift.Equatable {}
|
|
2117
|
+
extension FaceCaptcha.HMAC.Variant : Swift.Hashable {}
|
|
2118
|
+
extension FaceCaptcha.GCM.Mode : Swift.Equatable {}
|
|
2119
|
+
extension FaceCaptcha.GCM.Mode : Swift.Hashable {}
|
|
2120
|
+
extension FaceCaptcha.GCM.Error : Swift.Equatable {}
|
|
2121
|
+
extension FaceCaptcha.GCM.Error : Swift.Hashable {}
|
|
2122
|
+
extension FaceCaptcha.AES.Error : Swift.Equatable {}
|
|
2123
|
+
extension FaceCaptcha.AES.Error : Swift.Hashable {}
|
|
2124
|
+
extension FaceCaptcha.AES.Variant : Swift.Equatable {}
|
|
2125
|
+
extension FaceCaptcha.AES.Variant : Swift.Hashable {}
|
|
2126
|
+
extension FaceCaptcha.AES.Variant : Swift.RawRepresentable {}
|
|
2127
|
+
extension FaceCaptcha.SHA3.Variant : Swift.Equatable {}
|
|
2128
|
+
extension FaceCaptcha.SHA3.Variant : Swift.Hashable {}
|
|
2129
|
+
extension FaceCaptcha.PKCS5.PBKDF1.Error : Swift.Equatable {}
|
|
2130
|
+
extension FaceCaptcha.PKCS5.PBKDF1.Error : Swift.Hashable {}
|
|
2131
|
+
extension FaceCaptcha.PKCS5.PBKDF1.Variant : Swift.Equatable {}
|
|
2132
|
+
extension FaceCaptcha.PKCS5.PBKDF1.Variant : Swift.Hashable {}
|
|
2133
|
+
extension FaceCaptcha.Rabbit.Error : Swift.Equatable {}
|
|
2134
|
+
extension FaceCaptcha.Rabbit.Error : Swift.Hashable {}
|
|
2135
|
+
extension FaceCaptcha.DocumentscopyError : Swift.Equatable {}
|
|
2136
|
+
extension FaceCaptcha.DocumentscopyError : Swift.Hashable {}
|
|
2137
|
+
extension FaceCaptcha.CBC.Error : Swift.Equatable {}
|
|
2138
|
+
extension FaceCaptcha.CBC.Error : Swift.Hashable {}
|
|
2139
|
+
extension FaceCaptcha.Padding : Swift.Equatable {}
|
|
2140
|
+
extension FaceCaptcha.Padding : Swift.Hashable {}
|
|
2141
|
+
extension FaceCaptcha.Liveness3DErrorCode : Swift.Equatable {}
|
|
2142
|
+
extension FaceCaptcha.Liveness3DErrorCode : Swift.Hashable {}
|
|
2143
|
+
extension FaceCaptcha.Liveness3DErrorCode : Swift.RawRepresentable {}
|
|
2144
|
+
extension FaceCaptcha.CCM : FaceCaptcha.BlockMode {}
|
|
2145
|
+
extension FaceCaptcha.CCM.Error : Swift.Equatable {}
|
|
2146
|
+
extension FaceCaptcha.CCM.Error : Swift.Hashable {}
|
|
2147
|
+
extension FaceCaptcha.ChaCha20.Error : Swift.Equatable {}
|
|
2148
|
+
extension FaceCaptcha.ChaCha20.Error : Swift.Hashable {}
|
|
2149
|
+
extension FaceCaptcha.Visibility : Swift.Equatable {}
|
|
2150
|
+
extension FaceCaptcha.Visibility : Swift.Hashable {}
|
|
2151
|
+
extension FaceCaptcha.CipherError : Swift.Equatable {}
|
|
2152
|
+
extension FaceCaptcha.CipherError : Swift.Hashable {}
|
|
2153
|
+
extension FaceCaptcha.Poly1305.Error : Swift.Equatable {}
|
|
2154
|
+
extension FaceCaptcha.Poly1305.Error : Swift.Hashable {}
|
|
2155
|
+
extension FaceCaptcha.OFB.Error : Swift.Equatable {}
|
|
2156
|
+
extension FaceCaptcha.OFB.Error : Swift.Hashable {}
|
|
2157
|
+
extension FaceCaptcha.Bit : Swift.Equatable {}
|
|
2158
|
+
extension FaceCaptcha.Bit : Swift.Hashable {}
|
|
2159
|
+
extension FaceCaptcha.Bit : Swift.RawRepresentable {}
|
|
2160
|
+
extension FaceCaptcha.OCB.Mode : Swift.Equatable {}
|
|
2161
|
+
extension FaceCaptcha.OCB.Mode : Swift.Hashable {}
|
|
2162
|
+
extension FaceCaptcha.OCB.Error : Swift.Equatable {}
|
|
2163
|
+
extension FaceCaptcha.OCB.Error : Swift.Hashable {}
|
|
2164
|
+
extension FaceCaptcha.HKDF.Error : Swift.Equatable {}
|
|
2165
|
+
extension FaceCaptcha.HKDF.Error : Swift.Hashable {}
|
|
2166
|
+
extension FaceCaptcha.CFB.Error : Swift.Equatable {}
|
|
2167
|
+
extension FaceCaptcha.CFB.Error : Swift.Hashable {}
|
|
2168
|
+
extension FaceCaptcha.CFB.SegmentSize : Swift.Equatable {}
|
|
2169
|
+
extension FaceCaptcha.CFB.SegmentSize : Swift.Hashable {}
|
|
2170
|
+
extension FaceCaptcha.CFB.SegmentSize : Swift.RawRepresentable {}
|
|
2171
|
+
extension FaceCaptcha.PKCS5.PBKDF2.Error : Swift.Equatable {}
|
|
2172
|
+
extension FaceCaptcha.PKCS5.PBKDF2.Error : Swift.Hashable {}
|
|
2173
|
+
extension FaceCaptcha.FaceCaptchaError : Swift.Equatable {}
|
|
2174
|
+
extension FaceCaptcha.FaceCaptchaError : Swift.Hashable {}
|
|
2175
|
+
extension FaceCaptcha.Environment3D : Swift.Equatable {}
|
|
2176
|
+
extension FaceCaptcha.Environment3D : Swift.Hashable {}
|
|
2177
|
+
extension FaceCaptcha.Liveness3DThemeType : Swift.Equatable {}
|
|
2178
|
+
extension FaceCaptcha.Liveness3DThemeType : Swift.Hashable {}
|
|
2179
|
+
extension FaceCaptcha.Liveness3DThemeType : Swift.RawRepresentable {}
|
|
2180
|
+
extension FaceCaptcha.Liveness3DTheme.CancelButtonLocation : Swift.Equatable {}
|
|
2181
|
+
extension FaceCaptcha.Liveness3DTheme.CancelButtonLocation : Swift.Hashable {}
|
|
2182
|
+
extension FaceCaptcha.Liveness3DTheme.CancelButtonLocation : Swift.RawRepresentable {}
|
|
2183
|
+
extension FaceCaptcha.PCBC.Error : Swift.Equatable {}
|
|
2184
|
+
extension FaceCaptcha.PCBC.Error : Swift.Hashable {}
|
|
2185
|
+
extension FaceCaptcha.CTR : FaceCaptcha.BlockMode {}
|
|
2186
|
+
extension FaceCaptcha.CTR.Error : Swift.Equatable {}
|
|
2187
|
+
extension FaceCaptcha.CTR.Error : Swift.Hashable {}
|