react-native-security-suite 0.9.8 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Security solutions for React Native both platform Android and iOS
|
|
4
4
|
You can use any of the following:
|
|
5
5
|
|
|
6
|
-
<ol><li>Android Root device or iOS Jailbreak device detection</li><li>Disable
|
|
6
|
+
<ol><li>Android Root device or iOS Jailbreak device detection</li><li>Disable screenshot or screen record</li><li>Text Encryption/Decryption</li><li>Secure storage</li><li>Diffie–Hellman key exchange</li><li>SSL Pinning & public key pinning</li><li>Network Logger (Android Chucker - iOS Pulse)</li></ol>
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -88,25 +88,29 @@ console.log('Decrypted result: ', hardDecrypted);
|
|
|
88
88
|
```js
|
|
89
89
|
import { fetch } from 'react-native-security-suite';
|
|
90
90
|
|
|
91
|
-
const response = await fetch(
|
|
92
|
-
'
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
headers: {
|
|
96
|
-
'Content-Type': 'application/json',
|
|
97
|
-
},
|
|
98
|
-
body: {
|
|
99
|
-
key: value,
|
|
100
|
-
},
|
|
101
|
-
certificates: ['sha256/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='],
|
|
102
|
-
validDomains: ['example.com'],
|
|
103
|
-
timeout: 6000,
|
|
91
|
+
const response = await fetch('https://example.com/api', {
|
|
92
|
+
method: 'POST', // or any http methods
|
|
93
|
+
headers: {
|
|
94
|
+
'Content-Type': 'application/json',
|
|
104
95
|
},
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
body: {
|
|
97
|
+
key: value,
|
|
98
|
+
},
|
|
99
|
+
certificates: ['sha256/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='],
|
|
100
|
+
validDomains: ['example.com'],
|
|
101
|
+
timeout: 6000,
|
|
102
|
+
});
|
|
107
103
|
console.log('server response: ', response.json());
|
|
108
104
|
```
|
|
109
105
|
|
|
106
|
+
7\. Network Logger (Android Chucker - iOS Pulse):
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
import { fetch } from 'react-native-security-suite';
|
|
110
|
+
|
|
111
|
+
fetch(YOUR_REQUEST, __DEV__);
|
|
112
|
+
```
|
|
113
|
+
|
|
110
114
|
## Contributing
|
|
111
115
|
|
|
112
116
|
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
@@ -46,13 +46,11 @@ public class SecureViewManager extends ViewGroupManager<SecureView> {
|
|
|
46
46
|
@Nullable
|
|
47
47
|
@Override
|
|
48
48
|
public Map<String, Integer> getCommandsMap() {
|
|
49
|
-
|
|
50
|
-
return MapBuilder.of("1", 1);
|
|
49
|
+
return MapBuilder.of("create", COMMAND_CREATE);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
@Override
|
|
54
53
|
public void receiveCommand(@NonNull SecureView root, String commandId, @Nullable ReadableArray args) {
|
|
55
|
-
Log.d("hereeeee", commandId);
|
|
56
54
|
super.receiveCommand(root, commandId, args);
|
|
57
55
|
int commandIdInt = Integer.parseInt(commandId);
|
|
58
56
|
if (commandIdInt == COMMAND_CREATE) {
|