@oiti/rn-liveness3d 1.0.0 → 1.0.2

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