Installations
npm install react-native-secure-randombytes
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
10.16.0
NPM Version
6.9.0
Score
61.8
Supply Chain
91.2
Quality
75.1
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
Java (41.58%)
Objective-C (33.21%)
JavaScript (13.29%)
Ruby (11.92%)
Developer
WoeOm
Download Statistics
Total Downloads
127,685
Last Day
1
Last Week
22
Last Month
61
Last Year
1,967
GitHub Statistics
3 Stars
44 Commits
3 Forks
2 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
3.0.2
Package Id
react-native-secure-randombytes@3.0.2
Unpacked Size
25.37 kB
Size
6.73 kB
File Count
16
NPM Version
6.9.0
Node Version
10.16.0
Total Downloads
Cumulative downloads
Total Downloads
127,685
Last day
0%
1
Compared to previous day
Last week
120%
22
Compared to previous week
Last month
-66.3%
61
Compared to previous month
Last year
-82.6%
1,967
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
react-native-secure-randombytes
Usage
1import { randomBytes } from 'react-native-randombytes' 2 3// asynchronous API 4// uses iOS-side SecRandomCopyBytes 5randomBytes(4, (err, bytes) => { 6 console.log(bytes.toString('hex')) 7}) 8 9asyncRandomBytes.then((bytes) => {},(err) => {})
Installation
Automatic - Android / iOS (recommended)
1rnpm link
Manual
iOS
-
Drag RNRandomBytes.xcodeproj from node_modules/react-native-secure-randombytes into your XCode project.
-
Click on the project in XCode, go to Build Phases, then Link Binary With Libraries and add
libRNRandomBytes.a
Confused? See an example with screenshots here
Android
- Update Gradle Settings
1// file: android/settings.gradle 2... 3 4include ':randombytes', ':app' 5project(':randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-randombytes/android')
- Update Gradle Build
1// file: android/app/build.gradle 2... 3 4dependencies { 5 ... 6 compile project(':randombytes') 7}
- Register React Package
1... 2import com.bitgo.randombytes.RandomBytesPackage // import 3 4public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 5 6 private ReactInstanceManager mReactInstanceManager; 7 private ReactRootView mReactRootView; 8 9 @Override 10 protected void onCreate(Bundle savedInstanceState) { 11 super.onCreate(savedInstanceState); 12 mReactRootView = new ReactRootView(this); 13 mReactInstanceManager = ReactInstanceManager.builder() 14 .setApplication(getApplication()) 15 .setBundleAssetName("index.android.bundle") 16 .setJSMainModuleName("index.android") 17 .addPackage(new MainReactPackage()) 18 .addPackage(new RandomBytesPackage()) // register package here 19 .setUseDeveloperSupport(BuildConfig.DEBUG) 20 .setInitialLifecycleState(LifecycleState.RESUMED) 21 .build(); 22 mReactRootView.startReactApplication(mReactInstanceManager, "AwesomeProject", null); 23 setContentView(mReactRootView); 24 } 25... 26
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More