react-native-security-suite 0.5.10 → 0.5.12

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 (2) hide show
  1. package/README.md +2 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -23,7 +23,6 @@ npm install react-native-security-suite
23
23
 
24
24
  ## Usage
25
25
 
26
- \
27
26
  1. Android Root or iOS Jailbreak devices detection example:
28
27
 
29
28
  ```js
@@ -37,7 +36,6 @@ console.log('Root/Jailbreak detection result: ', isRiskyDevice);
37
36
  2. Text Encryption/Decryption example:
38
37
 
39
38
  ```js
40
- //
41
39
  const softEncrypted = await encrypt('STR_FOR_ENCRYPT');
42
40
  console.log('Encrypted result: ', softEncrypted);
43
41
  const softDecrypted = await decrypt('STR_FOR_DECRYPT');
@@ -67,7 +65,6 @@ import {
67
65
  decrypt,
68
66
  } from 'react-native-security-suite';
69
67
 
70
- // Hard Encrypt/Decrypt with sharedKey
71
68
  const publicKey = await getPublicKey();
72
69
  console.log('Public key: ', publicKey);
73
70
  /*
@@ -77,7 +74,6 @@ console.log('Public key: ', publicKey);
77
74
  const sharedKey = await getSharedKey('SERVER_PUBLIC_KEY');
78
75
  console.log('Shared key: ', sharedKey);
79
76
 
80
- // 1. Hard Encrypt/Decrypt by sharedKey
81
77
  const hardEncrypted = await encryptBySharedKey('STR_FOR_ENCRYPT');
82
78
  console.log('Encrypted result: ', hardEncrypted);
83
79
  const hardDecrypted = await decryptBySharedKey('STR_FOR_DECRYPT');
@@ -93,18 +89,11 @@ import { fetch } from 'react-native-security-suite';
93
89
  const response = await fetch('URL', {
94
90
  method: 'GET', // or any http methods
95
91
  headers: {
96
- /* your request header */
97
92
  'Content-Type': 'application/json',
98
93
  },
99
94
  body: undefiend,
100
- certificates: [
101
- /* certificates */
102
- 'sha256/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=',
103
- ],
104
- validDomains: [
105
- /* your valid domains */
106
- 'example.com',
107
- ],
95
+ certificates: ['sha256/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='],
96
+ validDomains: ['example.com'],
108
97
  timeout: 6000,
109
98
  });
110
99
  console.log('server response: ', response.json());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-security-suite",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Security solution for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",