react-native-security-suite 0.7.0 → 0.7.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.
- package/README.md +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,21 +81,27 @@ console.log('Decrypted result: ', hardDecrypted);
|
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
\
|
|
84
|
-
5. SSL Pinning example:
|
|
84
|
+
5. SSL Pinning with android network logger example:
|
|
85
85
|
|
|
86
86
|
```js
|
|
87
87
|
import { fetch } from 'react-native-security-suite';
|
|
88
88
|
|
|
89
|
-
const response = await fetch(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
const response = await fetch(
|
|
90
|
+
'https://example.com/api',
|
|
91
|
+
{
|
|
92
|
+
method: 'POST', // or any http methods
|
|
93
|
+
headers: {
|
|
94
|
+
'Content-Type': 'application/json',
|
|
95
|
+
},
|
|
96
|
+
body: {
|
|
97
|
+
key: value,
|
|
98
|
+
},
|
|
99
|
+
certificates: ['sha256/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='],
|
|
100
|
+
validDomains: ['example.com'],
|
|
101
|
+
timeout: 6000,
|
|
93
102
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
validDomains: ['example.com'],
|
|
97
|
-
timeout: 6000,
|
|
98
|
-
});
|
|
103
|
+
__DEV__
|
|
104
|
+
);
|
|
99
105
|
console.log('server response: ', response.json());
|
|
100
106
|
```
|
|
101
107
|
|