Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHA 512 #9

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#tests
test
coverage

#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml

#editor settings
.idea
.editorconfig
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# react-native-sha256
sha256 natively for react-native
# react-native-sha512
sha512 natively for react-native

Speed is king, especially for javascript-driven applications with react-native!
This library provides native sha256-hashes for a string on both iOS and Android
natively.

# Installation
```
yarn add react-native-sha256
yarn add react-native-sha512
react-native link
```

Expand All @@ -16,18 +16,17 @@ react-native link
Import the lib into your project:

```javascript
import { sha256 } from 'react-native-sha256';
import { sha512 } from 'react-native-sha512';
```

Build a sha256-hash:
Build a sha512-hash:

```javascript
sha256("Test").then( hash => {
sha512("Test").then( hash => {
console.log(hash);
})
```

# File-Hashes

If you need to calculate SHA-256 hashes from a file, use this method of react-native-fs:
(https://github.com/itinance/react-native-fs#hashfilepath-string-algorithm-string-promisestring)
Forked from https://github.com/itinance/react-native-sha256

Binary file added android/.gradle/4.4/fileChanges/last-build.bin
Binary file not shown.
Binary file added android/.gradle/4.4/fileContent/fileContent.lock
Binary file not shown.
Binary file added android/.gradle/4.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added android/.gradle/4.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file not shown.
Binary file added android/.gradle/4.4/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file added android/.gradle/4.4/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file added android/.gradle/4.4/javaCompile/javaCompile.lock
Binary file not shown.
Binary file added android/.gradle/4.4/javaCompile/taskHistory.bin
Binary file not shown.
Binary file added android/.gradle/4.4/javaCompile/taskJars.bin
Binary file not shown.
Binary file not shown.
Binary file added android/.gradle/4.4/taskHistory/taskHistory.lock
Binary file not shown.
Binary file added android/.gradle/4.6/fileChanges/last-build.bin
Binary file not shown.
Binary file added android/.gradle/4.6/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added android/.gradle/4.6/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added android/.gradle/4.6/taskHistory/taskHistory.bin
Binary file not shown.
Binary file added android/.gradle/4.6/taskHistory/taskHistory.lock
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Oct 09 15:51:46 BRT 2018
gradle.version=4.6
Binary file not shown.
Empty file.
Binary file added android/.idea/caches/build_file_checksums.ser
Binary file not shown.
29 changes: 29 additions & 0 deletions android/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading