├── .all-contributorsrc ├── .eslintrc.js ├── .github ├── stale.yml └── workflows │ ├── website-deploy.yml │ └── windows-ci.yml ├── .gitignore ├── .npmignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── RNSensitiveInfo.ts ├── android ├── .project ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── dev │ │ └── mcodex │ │ ├── RNSensitiveInfoModule.java │ │ ├── RNSensitiveInfoPackage.java │ │ └── utils │ │ └── AppConstants.java │ └── res │ ├── drawable-hdpi │ ├── ic_fp_40px.png │ └── tile.9.png │ ├── drawable-mdpi │ └── ic_fp_40px.png │ ├── drawable-xhdpi │ └── ic_fp_40px.png │ ├── drawable-xxhdpi │ └── ic_fp_40px.png │ ├── drawable-xxxhdpi │ └── ic_fp_40px.png │ ├── drawable │ ├── card.xml │ ├── ic_fingerprint_error.xml │ └── ic_fingerprint_success.xml │ ├── layout │ ├── fingerprint_dialog_container.xml │ └── fingerprint_dialog_content.xml │ ├── values-sw600dp │ ├── template-dimens.xml │ └── template-styles.xml │ ├── values-v11 │ └── template-styles.xml │ ├── values-v21 │ ├── base-colors.xml │ └── base-template-styles.xml │ └── values │ ├── base-strings.xml │ ├── colors.xml │ ├── strings.xml │ ├── template-dimens.xml │ └── template-styles.xml ├── cover.png ├── example ├── .buckconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── __tests__ │ ├── App-test.tsx │ └── CheckStore.tsx ├── android │ ├── app │ │ ├── _BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── ReactNativeFlipper.java │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example-tvOS │ │ └── Info.plist │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── example-tvOS.xcscheme │ │ │ └── example.xcscheme │ ├── example.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── example.entitlements │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── jest-setups │ ├── jest.setup.js │ └── jest.setup.windows.js ├── metro.config.js ├── package.json ├── src │ ├── pages │ │ └── Home │ │ │ └── index.tsx │ └── routes │ │ └── index.tsx ├── tsconfig.json ├── windows │ ├── .gitignore │ ├── example.sln │ └── example │ │ ├── .gitignore │ │ ├── App.cpp │ │ ├── App.h │ │ ├── App.idl │ │ ├── App.xaml │ │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ │ ├── AutolinkedNativeModules.g.cpp │ │ ├── AutolinkedNativeModules.g.h │ │ ├── AutolinkedNativeModules.g.targets │ │ ├── MainPage.cpp │ │ ├── MainPage.h │ │ ├── MainPage.idl │ │ ├── MainPage.xaml │ │ ├── Package.appxmanifest │ │ ├── PropertySheet.props │ │ ├── ReactPackageProvider.cpp │ │ ├── ReactPackageProvider.h │ │ ├── example.vcxproj │ │ ├── example.vcxproj.filters │ │ ├── example_TemporaryKey.pfx │ │ ├── packages.config │ │ ├── pch.cpp │ │ └── pch.h ├── yalc.lock └── yarn.lock ├── index.d.ts ├── ios ├── RNSensitiveInfo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ ├── classapp.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ │ ├── denissborisovs.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── mtandrade.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── RNSensitiveInfo.xcscheme │ └── xcuserdata │ │ ├── classapp.xcuserdatad │ │ └── xcschemes │ │ │ ├── RNSensitiveInfo.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── mtandrade.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── RNSensitiveInfo │ ├── RNSensitiveInfo.h │ └── RNSensitiveInfo.m ├── package.json ├── react-native-sensitive-info.podspec ├── rollup.config.js ├── tsconfig.json ├── windows ├── .gitignore ├── README.md ├── RNSensitiveInfo.sln ├── RNSensitiveInfo │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RNSensitiveInfo.csproj │ ├── RNSensitiveInfoModule.cs │ └── ReactPackageProvider.cs ├── RNSensitiveInfoCPP │ ├── PropertySheet.props │ ├── RNSensitiveInfoCPP.vcxproj │ ├── RNSensitiveInfoCPP.vcxproj.filters │ └── packages.config ├── RNSensitiveInfoCPP61.sln ├── RNSensitiveInfoCPP61 │ ├── PropertySheet.props │ ├── RNSensitiveInfoCPP61.vcxproj │ ├── RNSensitiveInfoCPP61.vcxproj.filters │ └── packages.config ├── RNSensitiveInfoCPP62.sln ├── RNSensitiveInfoCPP63.sln └── code │ ├── RNSensitiveInfoCPP.cpp │ ├── RNSensitiveInfoCPP.def │ ├── RNSensitiveInfoCPP.h │ ├── ReactPackageProvider.cpp │ ├── ReactPackageProvider.h │ ├── ReactPackageProvider.idl │ ├── pch.cpp │ └── pch.h └── yarn.lock /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "mcodex", 10 | "name": "Mateus Andrade", 11 | "avatar_url": "https://avatars2.githubusercontent.com/u/5920613?v=4", 12 | "profile": "https://mcodex.github.io", 13 | "contributions": [ 14 | "doc", 15 | "code", 16 | "review", 17 | "ideas", 18 | "maintenance" 19 | ] 20 | }, 21 | { 22 | "login": "maggialejandro", 23 | "name": "Alejandro", 24 | "avatar_url": "https://avatars1.githubusercontent.com/u/3394748?v=4", 25 | "profile": "https://github.com/maggialejandro", 26 | "contributions": [ 27 | "code", 28 | "maintenance" 29 | ] 30 | } 31 | ], 32 | "contributorsPerLine": 7, 33 | "projectName": "react-native-sensitive-info", 34 | "projectOwner": "mCodex", 35 | "repoType": "github", 36 | "repoHost": "https://github.com", 37 | "skipCi": true 38 | } 39 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | es2020: true, 5 | }, 6 | extends: [ 7 | 'plugin:react/recommended', 8 | 'airbnb', 9 | 'plugin:@typescript-eslint/recommended', 10 | 'prettier/@typescript-eslint', 11 | 'plugin:prettier/recommended', 12 | ], 13 | parser: '@typescript-eslint/parser', 14 | parserOptions: { 15 | ecmaFeatures: { 16 | jsx: true, 17 | }, 18 | ecmaVersion: 11, 19 | sourceType: 'module', 20 | }, 21 | plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'], 22 | rules: { 23 | 'prettier/prettier': 'error', 24 | 'react-hooks/rules-of-hooks': 'error', 25 | 'react-hooks/exhaustive-deps': 'warn', 26 | 'react/jsx-filename-extension': [ 27 | 1, 28 | { 29 | extensions: ['.tsx'], 30 | }, 31 | ], 32 | 'import/prefer-default-export': 'off', 33 | 'react/jsx-one-expression-per-line': 'off', 34 | 'react/jsx-props-no-spreading': 'off', 35 | 'no-unused-expressions': 'off', 36 | 'react/prop-types': 'off', 37 | '@typescript-eslint/explicit-function-return-type': [ 38 | 'error', 39 | { 40 | allowExpressions: true, 41 | }, 42 | ], 43 | 'import/extensions': [ 44 | 'error', 45 | 'ignorePackages', 46 | { 47 | ts: 'never', 48 | tsx: 'never', 49 | }, 50 | ], 51 | }, 52 | settings: { 53 | 'import/resolver': { 54 | typescript: {}, 55 | }, 56 | }, 57 | }; 58 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 90 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - 📌 pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: 🚧 stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.github/workflows/website-deploy.yml: -------------------------------------------------------------------------------- 1 | name: website 2 | 3 | on: 4 | pull_request: 5 | branches: [website] 6 | push: 7 | branches: [website] 8 | 9 | jobs: 10 | checks: 11 | if: github.event_name != 'push' 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: '14.x' 18 | - name: Test Build 19 | run: | 20 | if [ -e yarn.lock ]; then 21 | yarn install --frozen-lockfile 22 | elif [ -e package-lock.json ]; then 23 | npm ci 24 | else 25 | npm i 26 | fi 27 | npm run build 28 | gh-release: 29 | if: github.event_name != 'pull_request' 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@v1 33 | - uses: actions/setup-node@v1 34 | with: 35 | node-version: '14.x' 36 | - name: Add key to allow access to repository 37 | env: 38 | SSH_AUTH_SOCK: /tmp/ssh_agent.sock 39 | run: | 40 | mkdir -p ~/.ssh 41 | ssh-keyscan github.com >> ~/.ssh/known_hosts 42 | echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa 43 | chmod 600 ~/.ssh/id_rsa 44 | cat <> ~/.ssh/config 45 | Host github.com 46 | HostName github.com 47 | IdentityFile ~/.ssh/id_rsa 48 | EOT 49 | - name: Release to GitHub Pages 50 | env: 51 | USE_SSH: true 52 | GIT_USER: git 53 | run: | 54 | git config --global user.email "actions@gihub.com" 55 | git config --global user.name "gh-actions" 56 | if [ -e yarn.lock ]; then 57 | yarn install --frozen-lockfile 58 | elif [ -e package-lock.json ]; then 59 | npm ci 60 | else 61 | npm i 62 | fi 63 | npx docusaurus deploy 64 | -------------------------------------------------------------------------------- /.github/workflows/windows-ci.yml: -------------------------------------------------------------------------------- 1 | name: Windows CI 2 | on: [pull_request] 3 | 4 | jobs: 5 | run-windows-tests: 6 | name: Build & run tests 7 | runs-on: windows-2019 8 | 9 | steps: 10 | - uses: actions/checkout@v2 11 | name: Checkout Code 12 | 13 | - name: Setup Node.js 14 | uses: actions/setup-node@v1 15 | with: 16 | node-version: '12.9.1' 17 | 18 | - name: Setup MSBuild 19 | uses: microsoft/setup-msbuild@v1.0.0 20 | with: 21 | vs-version: 16.5 22 | 23 | - name: Build the module 24 | run: | 25 | yarn 26 | yarn localPublish 27 | cd example 28 | yarn 29 | 30 | - name: Build x64 release 31 | run: | 32 | cd example 33 | npx react-native run-windows --release --no-packager --no-launch --logging 34 | 35 | - name: Start Appium server 36 | shell: powershell 37 | run: | 38 | cd example 39 | Start-Process PowerShell -ArgumentList "yarn appium" 40 | 41 | - name: Run tests 42 | run: | 43 | cd example 44 | yarn test:windows -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | build 17 | 18 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 19 | .grunt 20 | 21 | #idea 22 | .idea 23 | 24 | # node-waf configuration 25 | .lock-wscript 26 | 27 | # Compiled binary addons (http://nodejs.org/api/addons.html) 28 | build/Release 29 | 30 | # Dependency directory 31 | node_modules 32 | example/node_modules 33 | 34 | # Optional npm cache directory 35 | .npm 36 | 37 | # Optional REPL history 38 | .node_repl_history 39 | 40 | android/build/ 41 | android/local.properties 42 | android/.gradle/ 43 | android.yml 44 | *.iml 45 | 46 | windows/.vs 47 | windows/packages 48 | windows/RNSensitiveInfo/bin 49 | windows/RNSensitiveInfo/obj 50 | .DS_STORE 51 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !android/** 3 | !ios/** 4 | !windows/** 5 | !./package.json 6 | !index.d.ts 7 | !react-native-sensitive-info.podspec 8 | !build/** -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | trailingComma: 'all', 4 | }; 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ClassApp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Cover 2 | 3 | [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) 4 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 5 | [![npm version](https://badge.fury.io/js/react-native-sensitive-info.svg)](https://badge.fury.io/js/react-native-sensitive-info) 6 | [![npm downloads](https://img.shields.io/npm/dm/react-native-sensitive-info)](https://img.shields.io/npm/dm/react-native-sensitive-info) 7 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 8 | ![npm bundle size](https://img.shields.io/bundlephobia/min/react-native-sensitive-info) 9 | 10 | # React Native Sensitive Info 11 | 12 | `react-native-sensitive-info` manages all data stored in Android Shared Preferences, iOS Keychain and Windows Credentials. You can set and get all key/value using simple methods. 13 | 14 | ## Docs 15 | 16 | Check out the [docs](https://mcodex.github.io/react-native-sensitive-info/docs) for installation and instructions usage. 17 | 18 | ## Contributors ✨ 19 | 20 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |

Mateus Andrade

📖 💻 👀 🤔 🚧

Alejandro

💻 🚧
31 | 32 | 33 | 34 | 35 | 36 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 37 | 38 | ## Contributing 39 | 40 | Pull requests are always welcome :) -------------------------------------------------------------------------------- /RNSensitiveInfo.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RNSensitiveInfo } = NativeModules; 4 | 5 | export default { 6 | ...RNSensitiveInfo, 7 | // setInvalidatedByBiometricEnrollment( 8 | // invalidatedByBiometricEnrollment 9 | // ): Function { 10 | // if (RNSensitiveInfo.setInvalidatedByBiometricEnrollment == null) { 11 | // return; 12 | // } 13 | 14 | // return RNSensitiveInfo.setInvalidatedByBiometricEnrollment( 15 | // invalidatedByBiometricEnrollment 16 | // ); 17 | // }, 18 | // cancelFingerprintAuth() { 19 | // if (RNSensitiveInfo.cancelFingerprintAuth == null) { 20 | // return; 21 | // } 22 | 23 | // return RNSensitiveInfo.cancelFingerprintAuth(); 24 | // }, 25 | }; 26 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android_ 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | def DEFAULT_COMPILE_SDK_VERSION = 29 4 | def DEFAULT_BUILD_TOOLS_VERSION = "29.0.2" 5 | def DEFAULT_TARGET_SDK_VERSION = 29 6 | def DEFAULT_MIN_SDK_VERSION = 23 7 | 8 | buildscript { 9 | repositories { 10 | mavenCentral() 11 | google() //in newer versions of Android Studio 12 | } 13 | dependencies { 14 | classpath 'com.android.tools.build:gradle:3.4.1' 15 | } 16 | } 17 | 18 | android { 19 | compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION 20 | buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION 21 | 22 | defaultConfig { 23 | minSdkVersion project.hasProperty('minSdkVersion') ? project.minSdkVersion : DEFAULT_MIN_SDK_VERSION 24 | targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION 25 | versionCode 1 26 | versionName "1.0" 27 | ndk { 28 | abiFilters "armeabi-v7a", "x86" 29 | } 30 | } 31 | lintOptions { 32 | warning 'InvalidPackage' 33 | } 34 | } 35 | 36 | allprojects { 37 | repositories { 38 | maven { url "$rootDir/../node_modules/react-native/android" } // All of React Native (JS, Android binaries) is installed from npm 39 | mavenCentral() 40 | google() 41 | } 42 | } 43 | dependencies { 44 | implementation 'androidx.biometric:biometric:1.0.1' 45 | implementation 'com.facebook.react:react-native:+' 46 | } 47 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jan 14 21:51:10 CET 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/java/dev/mcodex/RNSensitiveInfoPackage.java: -------------------------------------------------------------------------------- 1 | package dev.mcodex.RNSensitiveInfo; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | public class RNSensitiveInfoPackage implements ReactPackage { 14 | 15 | @Override 16 | public List createNativeModules( 17 | ReactApplicationContext reactContext) { 18 | List modules = new ArrayList<>(); 19 | 20 | modules.add(new RNSensitiveInfoModule(reactContext)); 21 | 22 | return modules; 23 | } 24 | 25 | @Override 26 | public List createViewManagers( 27 | ReactApplicationContext reactContext) { 28 | return Collections.emptyList(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /android/src/main/java/dev/mcodex/utils/AppConstants.java: -------------------------------------------------------------------------------- 1 | package dev.mcodex.RNSensitiveInfo.utils; 2 | 3 | public interface AppConstants { 4 | 5 | String DIALOG_FRAGMENT_TAG = "authFragment"; 6 | 7 | // error codes 8 | String KM_ERROR_KEY_USER_NOT_AUTHENTICATED = "KM_ERROR_KEY_USER_NOT_AUTHENTICATED"; 9 | String FINGERPRINT_AUTHENTICATION_HELP = "FINGERPRINT_AUTHENTICATION_HELP"; 10 | String E_AUTHENTICATION_NOT_RECOGNIZED = "E_AUTHENTICATION_NOT_RECOGNIZED"; 11 | String E_AUTHENTICATION_CANCELLED = "E_AUTHENTICATION_CANCELLED"; 12 | String E_BIOMETRIC_NOT_SUPPORTED = "E_BIOMETRIC_NOT_SUPPORTED"; 13 | String E_INIT_FAILURE = "E_INIT_FAILURE"; 14 | String E_BIOMETRICS_INVALIDATED = "E_BIOMETRICS_INVALIDATED"; 15 | } -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_fp_40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-hdpi/ic_fp_40px.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_fp_40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-mdpi/ic_fp_40px.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_fp_40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-xhdpi/ic_fp_40px.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_fp_40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-xxhdpi/ic_fp_40px.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_fp_40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mCodex/react-native-sensitive-info/495dd7f08c077f5744e56803e45f54787df3dab3/android/src/main/res/drawable-xxxhdpi/ic_fp_40px.png -------------------------------------------------------------------------------- /android/src/main/res/drawable/card.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 21 | 22 | 24 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_fingerprint_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_fingerprint_success.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /android/src/main/res/layout/fingerprint_dialog_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 41 | 42 | 48 |