Skip to content

Commit 845d046

Browse files
committed
Merge branch 'master' into feature/example
2 parents d575696 + 73e39d2 commit 845d046

File tree

8 files changed

+31
-15
lines changed

8 files changed

+31
-15
lines changed

.github/stale.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Number of days of inactivity before an issue becomes stale
22
daysUntilStale: 30
33
# Number of days of inactivity before a stale issue is closed
4-
daysUntilClose: 3
4+
daysUntilClose: 90
55
# Issues with these labels will never be considered stale
66
exemptLabels:
7-
- pinned
7+
- 📌 pinned
88
- security
99
# Label to use when marking an issue as stale
1010
staleLabel: 🚧 stale

RNSensitiveInfo.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ const { RNSensitiveInfo } = NativeModules;
44

55
module.exports = {
66
...RNSensitiveInfo,
7-
setInvalidatedByBiometricEnrollment() {
7+
setInvalidatedByBiometricEnrollment(invalidatedByBiometricEnrollment) {
88
if (RNSensitiveInfo.setInvalidatedByBiometricEnrollment == null) {
99
return;
1010
}
1111

12-
return RNSensitiveInfo.setInvalidatedByBiometricEnrollment();
12+
return RNSensitiveInfo.setInvalidatedByBiometricEnrollment(
13+
invalidatedByBiometricEnrollment,
14+
);
1315
},
1416
cancelFingerprintAuth() {
1517
if (RNSensitiveInfo.cancelFingerprintAuth == null) {

android/src/main/java/br/com/classapp/RNSensitiveInfo/RNSensitiveInfoModule.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class PutExtraWithAESCallback implements FingerprintUiHelper.Callback {
348348
@Override
349349
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
350350
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
351-
putExtraWithAES(key, value, mSharedPreferences, showModal, strings, pm, result.getCryptoObject().getCipher());
351+
putExtraWithAES(key, value, mSharedPreferences, true, strings, pm, result.getCryptoObject().getCipher());
352352
}
353353
}
354354

@@ -390,7 +390,7 @@ public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
390390
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
391391
super.onAuthenticationSucceeded(result);
392392
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
393-
putExtraWithAES(key, value, mSharedPreferences, showModal, strings, pm, result.getCryptoObject().getCipher());
393+
putExtraWithAES(key, value, mSharedPreferences, false, strings, pm, result.getCryptoObject().getCipher());
394394
}
395395
}
396396
}, null);
@@ -459,7 +459,7 @@ class DecryptWithAesCallback implements FingerprintUiHelper.Callback {
459459
@Override
460460
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
461461
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
462-
decryptWithAes(encrypted, showModal, strings, pm, result.getCryptoObject().getCipher());
462+
decryptWithAes(encrypted, true, strings, pm, result.getCryptoObject().getCipher());
463463
}
464464
}
465465

@@ -501,7 +501,7 @@ public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
501501
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
502502
super.onAuthenticationSucceeded(result);
503503
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
504-
decryptWithAes(encrypted, showModal, strings, pm, result.getCryptoObject().getCipher());
504+
decryptWithAes(encrypted, false, strings, pm, result.getCryptoObject().getCipher());
505505
}
506506
}
507507
}, null);

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ interface RNSensitiveInfoAndroidDialogStrings {
3232
export interface RNSensitiveInfoOptions {
3333
kSecAccessControl?: RNSensitiveInfoAccessControlOptions;
3434
kSecAttrAccessible?: RNSensitiveInfoAttrAccessibleOptions;
35+
kSecAttrSynchronizable?: boolean;
3536
keychainService?: string;
3637
sharedPreferencesName?: string;
3738
touchID?: boolean;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-sensitive-info",
3-
"version": "5.5.5",
3+
"version": "5.5.7",
44
"main": "RNSensitiveInfo.js",
55
"types": "index.d.ts",
66
"description": "react-native-sensitive-info manages all data stored in Android Shared Preferences and iOS Keychain. You can set, get and delete keys/values using simple methods.",
@@ -15,7 +15,7 @@
1515
"Mateus Andrade [email protected]",
1616
"Samin Shams <[email protected]>"
1717
],
18-
"homepage": "https://github.com/mcodex/react-native-sensitive-info",
18+
"homepage": "https://mcodex.dev/react-native-sensitive-info/",
1919
"bugs": {
2020
"url": "https://github.com/mcodex/react-native-sensitive-info/issues"
2121
},

website/docs/installation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar_label: Installation
66

77
First of all, install it using `npm` or `yarn`
88

9+
### Master branch (using Keychain and Android Shared Preferences)
10+
911
```bash
1012
npm install --save react-native-sensitive-info
1113
```
@@ -14,6 +16,17 @@ npm install --save react-native-sensitive-info
1416
yarn add react-native-sensitive-info
1517
```
1618

19+
### Keystore branch (using Keychain and Keystore)
20+
21+
```bash
22+
npm install --save git://github.com/mCodex/react-native-sensitive-info#keystore
23+
```
24+
25+
```bash
26+
yarn add git://github.com/mCodex/react-native-sensitive-info#keystore
27+
```
28+
29+
1730
## Linking
1831

1932
### React-Native >= 0.60

website/docs/setItem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Check out the options that you can use for [Android](android_options) and [iOS](
1515
Example:
1616

1717
```javascript
18-
import RNSInfo from 'react-native-sensitive-info';
18+
import SInfo from 'react-native-sensitive-info';
1919

2020
const myFunc = async () => {
2121
return SInfo.setItem('key1', 'value1', {
@@ -39,4 +39,4 @@ But if you rather not to use it our **default** sharedPreferencesName is: **shar
3939
SInfo.setItem('key1', 'value1', {});
4040
```
4141

42-
If you used Android's getDefaultSharedPreferences in your project the shared preference's name that you are looking for is: **com.mypackage.MyApp_preferences**. On the other hand if you used iOS's Keychain the default service is: **app**.
42+
If you used Android's getDefaultSharedPreferences in your project the shared preference's name that you are looking for is: **com.mypackage.MyApp_preferences**. On the other hand if you used iOS's Keychain the default service is: **app**.

website/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5686,9 +5686,9 @@ [email protected], lodash.uniq@^4.5.0:
56865686
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
56875687

56885688
lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5:
5689-
version "4.17.15"
5690-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
5691-
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
5689+
version "4.17.19"
5690+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
5691+
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
56925692

56935693
loglevel@^1.6.8:
56945694
version "1.6.8"

0 commit comments

Comments
 (0)