Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ yarn-error.log
.DS_Store
.idea/
.vscode/

.cxx/
.gradle/
android/build/
2 changes: 2 additions & 0 deletions FastCryptoTest/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 4 additions & 0 deletions FastCryptoTest/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
147 changes: 91 additions & 56 deletions FastCryptoTest/.gitignore
Original file line number Diff line number Diff line change
@@ -1,60 +1,95 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
# React Native Fast Crypto Test App

# node.js
#
# React Native
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Metro
.metro-health-check*
.haste_cache/

# Debug
flipper-dump.txt

# React Native Codegen
FBReactNativeSpec/
react-native-codegen-*.tgz

# Bundle artifacts
*.jsbundle

# CocoaPods
/ios/Pods/
# Android
**/.gradle/
**/build/
**/.cxx/
android/app/debug/
android/app/release/
android/gradle/wrapper/gradle-wrapper.jar
android/local.properties
android/gradlew
android/gradlew.bat
*.hprof
*.ap_
*.dex

# iOS
ios/build/
ios/Pods/
ios/Podfile.lock
ios/*.xcworkspace/xcuserdata/
ios/*.xcodeproj/xcuserdata/
ios/*.xcodeproj/project.xcworkspace/xcuserdata/
ios/build/Build/Intermediates.noindex/
ios/build/Build/Products/
ios/.xcode.env.local
DerivedData/

# macOS
.DS_Store

# Temporary files
*.tmp
*.temp

# Local Environment
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/

# IDE
.vscode/
.idea/
*.swp
*.swo

# Misc
*.tgz
*.tar.gz

# React Native Debugger
.vscode/settings.json

# Testing
e2e/artifacts/

# Babel
.babel_cache/

# Ruby (CocoaPods)
Gemfile.lock
vendor/
7 changes: 7 additions & 0 deletions FastCryptoTest/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions FastCryptoTest/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
10 changes: 10 additions & 0 deletions FastCryptoTest/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
27 changes: 23 additions & 4 deletions FastCryptoTest/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# react-native-fast-crypto Test App
# FastCryptoTest

This app runs react-native-fast-crypto unit tests.
Simple test app for `react-native-fast-crypto` library.

To launch the tests, first run `yarn install` in this folder to set up the dependencies, and then run either `yarn android` or `yarn ios`.
## Running the tests

If you want to edit the react-native-fast-crypto library while using this app, run the `update-test.sh` script located in the outer folder to copy your changes into `node_modules`.
```bash
# Install dependencies
yarn install

# Start Metro
yarn start

# Run on Android
yarn android

# Run on iOS
yarn ios
```

The app will automatically run crypto tests including:
- pbkdf2 (ASCII and UTF-8 inputs)
- secp256k1 operations
- scrypt key derivation

Test results are displayed on screen.
Loading