react-native-security-suite 0.9.21 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/README.md +233 -65
  2. package/android/build.gradle +11 -0
  3. package/android/gradle.properties +1 -1
  4. package/android/src/main/java/com/securitysuite/CryptoConfig.java +158 -0
  5. package/android/src/main/java/com/securitysuite/CryptoUtils.java +152 -0
  6. package/android/src/main/java/com/securitysuite/EcdhKeyStore.java +60 -0
  7. package/android/src/main/java/com/securitysuite/HeaderSanitizer.java +75 -0
  8. package/android/src/main/java/com/securitysuite/JWSGenerator.java +237 -32
  9. package/android/src/main/java/com/securitysuite/JwsFetchPayload.java +81 -0
  10. package/android/src/main/java/com/securitysuite/Obfuscation.java +57 -0
  11. package/android/src/main/java/com/securitysuite/SecureStorageNative.java +211 -0
  12. package/android/src/main/java/com/securitysuite/SecureView.java +2 -10
  13. package/android/src/main/java/com/securitysuite/SecureWindowHelper.java +30 -0
  14. package/android/src/main/java/com/securitysuite/SecuritySuiteModule.java +310 -102
  15. package/android/src/main/java/com/securitysuite/Sslpinning.java +219 -106
  16. package/android/src/main/java/com/securitysuite/security/AppIntegrityChecker.java +133 -0
  17. package/android/src/main/java/com/securitysuite/security/EmulatorDetector.java +145 -0
  18. package/android/src/main/java/com/securitysuite/security/RuntimeDetector.java +234 -0
  19. package/android/src/test/java/com/securitysuite/JWSGeneratorTest.java +153 -0
  20. package/android/src/test/java/com/securitysuite/SecureStorageNativeTest.java +37 -0
  21. package/ios/CryptoConfig.swift +124 -0
  22. package/ios/JWSGenerator.swift +288 -0
  23. package/ios/JWSGeneratorTests.swift +168 -0
  24. package/ios/KeychainHelper.swift +104 -0
  25. package/ios/Obfuscation.swift +42 -0
  26. package/ios/SecureStorageNative.swift +84 -0
  27. package/ios/Security/AppIntegrityChecker.swift +85 -0
  28. package/ios/Security/EmulatorDetector.swift +45 -0
  29. package/ios/Security/RuntimeDetector.swift +107 -0
  30. package/ios/SecuritySuite.mm +28 -4
  31. package/ios/SecuritySuite.swift +407 -131
  32. package/ios/SslPinning.swift +242 -263
  33. package/lib/commonjs/clipboard/index.js +3 -0
  34. package/lib/commonjs/clipboard/index.js.map +1 -0
  35. package/lib/commonjs/crypto/index.js +39 -0
  36. package/lib/commonjs/crypto/index.js.map +1 -0
  37. package/lib/commonjs/device/index.js +40 -0
  38. package/lib/commonjs/device/index.js.map +1 -0
  39. package/lib/commonjs/errors.js +62 -0
  40. package/lib/commonjs/errors.js.map +1 -0
  41. package/lib/commonjs/index.js +220 -151
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/commonjs/integrity/index.js +40 -0
  44. package/lib/commonjs/integrity/index.js.map +1 -0
  45. package/lib/commonjs/jws.js +141 -0
  46. package/lib/commonjs/jws.js.map +1 -0
  47. package/lib/commonjs/legacy/cryptoOptions.js +20 -0
  48. package/lib/commonjs/legacy/cryptoOptions.js.map +1 -0
  49. package/lib/commonjs/native/bridge.js +23 -0
  50. package/lib/commonjs/native/bridge.js.map +1 -0
  51. package/lib/commonjs/network/index.js +3 -0
  52. package/lib/commonjs/network/index.js.map +1 -0
  53. package/lib/commonjs/risk/score.js +36 -0
  54. package/lib/commonjs/risk/score.js.map +1 -0
  55. package/lib/commonjs/runtime/index.js +31 -0
  56. package/lib/commonjs/runtime/index.js.map +1 -0
  57. package/lib/commonjs/screen/index.js +13 -0
  58. package/lib/commonjs/screen/index.js.map +1 -0
  59. package/lib/commonjs/securitySuite/index.js +42 -0
  60. package/lib/commonjs/securitySuite/index.js.map +1 -0
  61. package/lib/commonjs/storage/index.js +3 -0
  62. package/lib/commonjs/storage/index.js.map +1 -0
  63. package/lib/commonjs/types/detection.js +2 -0
  64. package/lib/commonjs/types/detection.js.map +1 -0
  65. package/lib/module/clipboard/index.js +3 -0
  66. package/lib/module/clipboard/index.js.map +1 -0
  67. package/lib/module/crypto/index.js +35 -0
  68. package/lib/module/crypto/index.js.map +1 -0
  69. package/lib/module/device/index.js +36 -0
  70. package/lib/module/device/index.js.map +1 -0
  71. package/lib/module/errors.js +55 -0
  72. package/lib/module/errors.js.map +1 -0
  73. package/lib/module/index.js +147 -148
  74. package/lib/module/index.js.map +1 -1
  75. package/lib/module/integrity/index.js +36 -0
  76. package/lib/module/integrity/index.js.map +1 -0
  77. package/lib/module/jws.js +127 -0
  78. package/lib/module/jws.js.map +1 -0
  79. package/lib/module/legacy/cryptoOptions.js +16 -0
  80. package/lib/module/legacy/cryptoOptions.js.map +1 -0
  81. package/lib/module/native/bridge.js +19 -0
  82. package/lib/module/native/bridge.js.map +1 -0
  83. package/lib/module/network/index.js +3 -0
  84. package/lib/module/network/index.js.map +1 -0
  85. package/lib/module/risk/score.js +32 -0
  86. package/lib/module/risk/score.js.map +1 -0
  87. package/lib/module/runtime/index.js +27 -0
  88. package/lib/module/runtime/index.js.map +1 -0
  89. package/lib/module/screen/index.js +5 -0
  90. package/lib/module/screen/index.js.map +1 -0
  91. package/lib/module/securitySuite/index.js +38 -0
  92. package/lib/module/securitySuite/index.js.map +1 -0
  93. package/lib/module/storage/index.js +3 -0
  94. package/lib/module/storage/index.js.map +1 -0
  95. package/lib/module/types/detection.js +2 -0
  96. package/lib/module/types/detection.js.map +1 -0
  97. package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts +215 -0
  98. package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/SecureView.d.ts +1 -1
  100. package/lib/typescript/commonjs/src/SecureView.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/clipboard/index.d.ts +2 -0
  102. package/lib/typescript/commonjs/src/clipboard/index.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/crypto/index.d.ts +15 -0
  104. package/lib/typescript/commonjs/src/crypto/index.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/device/index.d.ts +11 -0
  106. package/lib/typescript/commonjs/src/device/index.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/errors.d.ts +17 -0
  108. package/lib/typescript/commonjs/src/errors.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/helpers.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/src/index.d.ts +77 -24
  111. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/src/integrity/index.d.ts +6 -0
  113. package/lib/typescript/commonjs/src/integrity/index.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/src/jws.d.ts +44 -0
  115. package/lib/typescript/commonjs/src/jws.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts +35 -0
  117. package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/src/native/bridge.d.ts +12 -0
  119. package/lib/typescript/commonjs/src/native/bridge.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/src/network/index.d.ts +2 -0
  121. package/lib/typescript/commonjs/src/network/index.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/src/risk/score.d.ts +12 -0
  123. package/lib/typescript/commonjs/src/risk/score.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/src/runtime/index.d.ts +6 -0
  125. package/lib/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/src/screen/index.d.ts +3 -0
  127. package/lib/typescript/commonjs/src/screen/index.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/src/securitySuite/index.d.ts +6 -0
  129. package/lib/typescript/commonjs/src/securitySuite/index.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/src/storage/index.d.ts +2 -0
  131. package/lib/typescript/commonjs/src/storage/index.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/src/types/detection.d.ts +41 -0
  133. package/lib/typescript/commonjs/src/types/detection.d.ts.map +1 -0
  134. package/lib/typescript/module/docs/api-v1-proposal.d.ts +215 -0
  135. package/lib/typescript/module/docs/api-v1-proposal.d.ts.map +1 -0
  136. package/lib/typescript/module/src/SecureView.d.ts +1 -1
  137. package/lib/typescript/module/src/SecureView.d.ts.map +1 -1
  138. package/lib/typescript/module/src/clipboard/index.d.ts +2 -0
  139. package/lib/typescript/module/src/clipboard/index.d.ts.map +1 -0
  140. package/lib/typescript/module/src/crypto/index.d.ts +15 -0
  141. package/lib/typescript/module/src/crypto/index.d.ts.map +1 -0
  142. package/lib/typescript/module/src/device/index.d.ts +11 -0
  143. package/lib/typescript/module/src/device/index.d.ts.map +1 -0
  144. package/lib/typescript/module/src/errors.d.ts +17 -0
  145. package/lib/typescript/module/src/errors.d.ts.map +1 -0
  146. package/lib/typescript/module/src/helpers.d.ts.map +1 -1
  147. package/lib/typescript/module/src/index.d.ts +77 -24
  148. package/lib/typescript/module/src/index.d.ts.map +1 -1
  149. package/lib/typescript/module/src/integrity/index.d.ts +6 -0
  150. package/lib/typescript/module/src/integrity/index.d.ts.map +1 -0
  151. package/lib/typescript/module/src/jws.d.ts +44 -0
  152. package/lib/typescript/module/src/jws.d.ts.map +1 -0
  153. package/lib/typescript/module/src/legacy/cryptoOptions.d.ts +35 -0
  154. package/lib/typescript/module/src/legacy/cryptoOptions.d.ts.map +1 -0
  155. package/lib/typescript/module/src/native/bridge.d.ts +12 -0
  156. package/lib/typescript/module/src/native/bridge.d.ts.map +1 -0
  157. package/lib/typescript/module/src/network/index.d.ts +2 -0
  158. package/lib/typescript/module/src/network/index.d.ts.map +1 -0
  159. package/lib/typescript/module/src/risk/score.d.ts +12 -0
  160. package/lib/typescript/module/src/risk/score.d.ts.map +1 -0
  161. package/lib/typescript/module/src/runtime/index.d.ts +6 -0
  162. package/lib/typescript/module/src/runtime/index.d.ts.map +1 -0
  163. package/lib/typescript/module/src/screen/index.d.ts +3 -0
  164. package/lib/typescript/module/src/screen/index.d.ts.map +1 -0
  165. package/lib/typescript/module/src/securitySuite/index.d.ts +6 -0
  166. package/lib/typescript/module/src/securitySuite/index.d.ts.map +1 -0
  167. package/lib/typescript/module/src/storage/index.d.ts +2 -0
  168. package/lib/typescript/module/src/storage/index.d.ts.map +1 -0
  169. package/lib/typescript/module/src/types/detection.d.ts +41 -0
  170. package/lib/typescript/module/src/types/detection.d.ts.map +1 -0
  171. package/package.json +2 -4
  172. package/src/clipboard/index.ts +1 -0
  173. package/src/crypto/index.ts +49 -0
  174. package/src/device/index.ts +47 -0
  175. package/src/errors.ts +84 -0
  176. package/src/index.tsx +293 -195
  177. package/src/integrity/index.ts +46 -0
  178. package/src/jws.ts +213 -0
  179. package/src/legacy/cryptoOptions.ts +49 -0
  180. package/src/native/bridge.ts +37 -0
  181. package/src/network/index.ts +1 -0
  182. package/src/risk/score.ts +49 -0
  183. package/src/runtime/index.ts +43 -0
  184. package/src/screen/index.ts +2 -0
  185. package/src/securitySuite/index.ts +45 -0
  186. package/src/storage/index.ts +1 -0
  187. package/src/types/detection.ts +46 -0
  188. package/android/src/main/java/com/securitysuite/StorageEncryption.java +0 -52
  189. package/ios/StorageEncryption.swift +0 -89
@@ -0,0 +1,85 @@
1
+ import Foundation
2
+ import Security
3
+
4
+ enum AppIntegrityChecker {
5
+ static func verify() -> [String: Any] {
6
+ let bundleId = Bundle.main.bundleIdentifier ?? ""
7
+ let debuggable = isDebugBuild()
8
+ let buildType = resolveBuildType(debuggable: debuggable)
9
+ let validSignature = validateCodeSignature()
10
+ let suspiciousLibraries = scanInjectedDylibs()
11
+ let tampered = !validSignature || !suspiciousLibraries.isEmpty
12
+
13
+ var result: [String: Any] = [
14
+ "validSignature": validSignature,
15
+ "debuggable": debuggable,
16
+ "tampered": tampered,
17
+ "buildType": buildType,
18
+ "bundleIdentifier": bundleId,
19
+ ]
20
+
21
+ if debuggable {
22
+ result["installerTrusted"] = true
23
+ }
24
+
25
+ return result
26
+ }
27
+
28
+ private static func validateCodeSignature() -> Bool {
29
+ guard let bundleURL = Bundle.main.bundleURL as CFURL? else {
30
+ return false
31
+ }
32
+
33
+ var staticCode: SecStaticCode?
34
+ let createStatus = SecStaticCodeCreateWithPath(bundleURL, [], &staticCode)
35
+ guard createStatus == errSecSuccess, let code = staticCode else {
36
+ return false
37
+ }
38
+
39
+ let verifyStatus = SecStaticCodeCheckValidity(code, [], nil)
40
+ return verifyStatus == errSecSuccess
41
+ }
42
+
43
+ private static func scanInjectedDylibs() -> [String] {
44
+ let suspiciousKeywords = ["frida", "substrate", "cycript", "libhooker", "substitute", "ellekit"]
45
+ var matches: [String] = []
46
+ let imageCount = _dyld_image_count()
47
+
48
+ for index in 0..<imageCount {
49
+ guard let imageName = _dyld_get_image_name(index) else {
50
+ continue
51
+ }
52
+ let path = String(cString: imageName).lowercased()
53
+ guard path.hasPrefix("/var/") || path.contains("/mobilesubstrate/") else {
54
+ continue
55
+ }
56
+ for keyword in suspiciousKeywords where path.contains(keyword) {
57
+ matches.append(String(cString: imageName))
58
+ break
59
+ }
60
+ }
61
+
62
+ return matches
63
+ }
64
+
65
+ private static func isDebugBuild() -> Bool {
66
+ #if DEBUG
67
+ return true
68
+ #else
69
+ return false
70
+ #endif
71
+ }
72
+
73
+ private static func resolveBuildType(debuggable: Bool) -> String {
74
+ if debuggable {
75
+ return "debug"
76
+ }
77
+
78
+ if let receiptURL = Bundle.main.appStoreReceiptURL,
79
+ receiptURL.lastPathComponent == "sandboxReceipt" {
80
+ return "testflight"
81
+ }
82
+
83
+ return "release"
84
+ }
85
+ }
@@ -0,0 +1,45 @@
1
+ import Foundation
2
+ import IOSSecuritySuite
3
+
4
+ enum EmulatorDetector {
5
+ static func detect() -> [String: Any] {
6
+ var indicators: [String] = []
7
+
8
+ #if targetEnvironment(simulator)
9
+ indicators.append("TARGET_OS_SIMULATOR")
10
+ #endif
11
+
12
+ if IOSSecuritySuite.amIRunInEmulator() {
13
+ indicators.append("IOSSecuritySuite.amIRunInEmulator")
14
+ }
15
+
16
+ if let model = hardwareModel()?.lowercased() {
17
+ if model.contains("simulator") || model.contains("x86_64") || model.contains("i386") {
18
+ indicators.append("hw.model:\(model)")
19
+ }
20
+ }
21
+
22
+ let isSimulator = !indicators.isEmpty
23
+
24
+ return [
25
+ "isEmulator": false,
26
+ "isSimulator": isSimulator,
27
+ "indicators": indicators,
28
+ ]
29
+ }
30
+
31
+ private static func hardwareModel() -> String? {
32
+ var size: size_t = 0
33
+ sysctlbyname("hw.model", nil, &size, nil, 0)
34
+ guard size > 0 else {
35
+ return nil
36
+ }
37
+
38
+ var model = [CChar](repeating: 0, count: size)
39
+ let result = sysctlbyname("hw.model", &model, &size, nil, 0)
40
+ guard result == 0 else {
41
+ return nil
42
+ }
43
+ return String(cString: model)
44
+ }
45
+ }
@@ -0,0 +1,107 @@
1
+ import Foundation
2
+ import IOSSecuritySuite
3
+ import Darwin
4
+
5
+ enum RuntimeDetector {
6
+ private static let fridaPorts: [UInt16] = [27042, 27043]
7
+ private static let suspiciousKeywords = [
8
+ "frida", "substrate", "cycript", "libhooker", "ellekit", "substitute", "xposed", "lsposed"
9
+ ]
10
+
11
+ static func detect() -> [String: Any] {
12
+ let suspiciousLibraries = scanLoadedLibraries()
13
+ let suspiciousPorts = scanFridaPorts()
14
+ let reverseEngineered = IOSSecuritySuite.amIReverseEngineered()
15
+ let fridaDetected = hasDyldInsert()
16
+ || reverseEngineered
17
+ || !suspiciousLibraries.isEmpty
18
+ || !suspiciousPorts.isEmpty
19
+ || canConnectToFrida()
20
+ let debuggerAttached = isDebuggerAttached()
21
+ let substrateDetected = suspiciousLibraries.contains(where: {
22
+ $0.lowercased().contains("substrate")
23
+ || $0.lowercased().contains("substitute")
24
+ || $0.lowercased().contains("ellekit")
25
+ })
26
+
27
+ return [
28
+ "debuggerAttached": debuggerAttached,
29
+ "fridaDetected": fridaDetected,
30
+ "substrateDetected": substrateDetected,
31
+ "suspiciousLibraries": suspiciousLibraries,
32
+ "suspiciousPorts": suspiciousPorts,
33
+ ]
34
+ }
35
+
36
+ private static func hasDyldInsert() -> Bool {
37
+ if let env = getenv("DYLD_INSERT_LIBRARIES") {
38
+ let value = String(cString: env)
39
+ return !value.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
40
+ }
41
+ return false
42
+ }
43
+
44
+ private static func scanLoadedLibraries() -> [String] {
45
+ var matches: [String] = []
46
+ let imageCount = _dyld_image_count()
47
+ for index in 0..<imageCount {
48
+ guard let imageName = _dyld_get_image_name(index) else {
49
+ continue
50
+ }
51
+ let name = String(cString: imageName).lowercased()
52
+ for keyword in suspiciousKeywords where name.contains(keyword) {
53
+ matches.append(String(cString: imageName))
54
+ break
55
+ }
56
+ }
57
+ return matches
58
+ }
59
+
60
+ private static func scanFridaPorts() -> [Int] {
61
+ fridaPorts.compactMap { port in
62
+ canConnect(to: port) ? Int(port) : nil
63
+ }
64
+ }
65
+
66
+ private static func canConnectToFrida() -> Bool {
67
+ fridaPorts.contains(where: canConnect)
68
+ }
69
+
70
+ private static func canConnect(to port: UInt16) -> Bool {
71
+ var addr = sockaddr_in()
72
+ addr.sin_len = UInt8(MemoryLayout<sockaddr_in>.size)
73
+ addr.sin_family = sa_family_t(AF_INET)
74
+ addr.sin_port = port.bigEndian
75
+ addr.sin_addr = in_addr(s_addr: inet_addr("127.0.0.1"))
76
+
77
+ let socketFd = socket(AF_INET, SOCK_STREAM, 0)
78
+ if socketFd < 0 {
79
+ return false
80
+ }
81
+ defer { close(socketFd) }
82
+
83
+ let result = withUnsafePointer(to: &addr) {
84
+ $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
85
+ connect(socketFd, $0, socklen_t(MemoryLayout<sockaddr_in>.size))
86
+ }
87
+ }
88
+ return result == 0
89
+ }
90
+
91
+ private static func isDebuggerAttached() -> Bool {
92
+ if IOSSecuritySuite.amIDebugged() {
93
+ return true
94
+ }
95
+
96
+ var info = kinfo_proc()
97
+ var mib: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
98
+ var size = MemoryLayout<kinfo_proc>.stride
99
+ let result = mib.withUnsafeMutableBufferPointer { buffer -> Int32 in
100
+ sysctl(buffer.baseAddress, u_int(buffer.count), &info, &size, nil, 0)
101
+ }
102
+ if result != 0 {
103
+ return false
104
+ }
105
+ return (info.kp_proc.p_flag & P_TRACED) != 0
106
+ }
107
+ }
@@ -5,22 +5,46 @@
5
5
 
6
6
  RCT_EXTERN_METHOD(getPublicKey:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
7
7
 
8
- RCT_EXTERN_METHOD(getSharedKey:(NSString)serverPK withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
8
+ RCT_EXTERN_METHOD(getSharedKey:(NSString)serverPK withOptions:(NSDictionary *)options withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
9
9
 
10
- RCT_EXTERN_METHOD(encrypt:(NSString)input withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
10
+ RCT_EXTERN_METHOD(establishSharedKey:(NSString)serverPK withOptions:(NSDictionary *)options withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
11
11
 
12
- RCT_EXTERN_METHOD(decrypt:(NSString)input withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
12
+ RCT_EXTERN_METHOD(encrypt:(NSString)input withOptions:(NSDictionary *)options withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
13
13
 
14
- RCT_EXTERN_METHOD(getDeviceId:(RCTResponseSenderBlock)callback)
14
+ RCT_EXTERN_METHOD(decrypt:(NSString)input withOptions:(NSDictionary *)options withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
15
+
16
+ RCT_EXTERN_METHOD(generateJWS:(NSDictionary)options withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
17
+
18
+ RCT_EXTERN_METHOD(obfuscate:(NSString)input withSecret:(NSString)secret withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
19
+
20
+ RCT_EXTERN_METHOD(deobfuscate:(NSString)input withSecret:(NSString)secret withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
15
21
 
16
22
  RCT_EXTERN_METHOD(storageEncrypt:(NSString)input withSecretKey:(NSString*)secretKey withHardEncryption:(BOOL)hardEncryption withCallback:(RCTResponseSenderBlock)callback)
17
23
 
18
24
  RCT_EXTERN_METHOD(storageDecrypt:(NSString)input withSecretKey:(NSString*)secretKey withHardEncryption:(BOOL)hardEncryption withCallback:(RCTResponseSenderBlock)callback)
19
25
 
26
+ RCT_EXTERN_METHOD(secureStorageSetItem:(NSString)key withValue:(NSString)value withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
27
+
28
+ RCT_EXTERN_METHOD(secureStorageGetItem:(NSString)key withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
29
+
30
+ RCT_EXTERN_METHOD(secureStorageRemoveItem:(NSString)key withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
31
+
32
+ RCT_EXTERN_METHOD(secureStorageClear:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
33
+
34
+ RCT_EXTERN_METHOD(secureStorageGetAllKeys:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
35
+
36
+ RCT_EXTERN_METHOD(getDeviceId:(RCTResponseSenderBlock)callback)
37
+
20
38
  RCT_EXTERN_METHOD(fetch:(NSString)url withData:(NSDictionary)data withCallback:(RCTResponseSenderBlock)callback)
21
39
 
22
40
  RCT_EXTERN_METHOD(deviceHasSecurityRisk:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
23
41
 
42
+ RCT_EXTERN_METHOD(runtimeDetect:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
43
+
44
+ RCT_EXTERN_METHOD(appIntegrityVerify:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
45
+
46
+ RCT_EXTERN_METHOD(deviceGetEnvironment:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject)
47
+
24
48
  + (BOOL)requiresMainQueueSetup
25
49
  {
26
50
  return NO;