diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..3a5ac32 --- /dev/null +++ b/.npmignore @@ -0,0 +1,12 @@ +#tests +test +coverage + +#build tools +.travis.yml +.jenkins.yml +.codeclimate.yml + +#editor settings +.idea +.editorconfig diff --git a/README.md b/README.md index 5b711a6..5fa0256 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# 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 @@ -7,7 +7,7 @@ natively. # Installation ``` -yarn add react-native-sha256 +yarn add react-native-sha512 react-native link ``` @@ -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) \ No newline at end of file +Forked from https://github.com/itinance/react-native-sha256 + diff --git a/android/.gradle/4.4/fileChanges/last-build.bin b/android/.gradle/4.4/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/android/.gradle/4.4/fileChanges/last-build.bin differ diff --git a/android/.gradle/4.4/fileContent/fileContent.lock b/android/.gradle/4.4/fileContent/fileContent.lock new file mode 100644 index 0000000..0c3b763 Binary files /dev/null and b/android/.gradle/4.4/fileContent/fileContent.lock differ diff --git a/android/.gradle/4.4/fileHashes/fileHashes.bin b/android/.gradle/4.4/fileHashes/fileHashes.bin new file mode 100644 index 0000000..1778b67 Binary files /dev/null and b/android/.gradle/4.4/fileHashes/fileHashes.bin differ diff --git a/android/.gradle/4.4/fileHashes/fileHashes.lock b/android/.gradle/4.4/fileHashes/fileHashes.lock new file mode 100644 index 0000000..78effab Binary files /dev/null and b/android/.gradle/4.4/fileHashes/fileHashes.lock differ diff --git a/android/.gradle/4.4/fileHashes/resourceHashesCache.bin b/android/.gradle/4.4/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..816ee03 Binary files /dev/null and b/android/.gradle/4.4/fileHashes/resourceHashesCache.bin differ diff --git a/android/.gradle/4.4/javaCompile/classAnalysis.bin b/android/.gradle/4.4/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..e1ea370 Binary files /dev/null and b/android/.gradle/4.4/javaCompile/classAnalysis.bin differ diff --git a/android/.gradle/4.4/javaCompile/jarAnalysis.bin b/android/.gradle/4.4/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..a39141d Binary files /dev/null and b/android/.gradle/4.4/javaCompile/jarAnalysis.bin differ diff --git a/android/.gradle/4.4/javaCompile/javaCompile.lock b/android/.gradle/4.4/javaCompile/javaCompile.lock new file mode 100644 index 0000000..44e6d63 Binary files /dev/null and b/android/.gradle/4.4/javaCompile/javaCompile.lock differ diff --git a/android/.gradle/4.4/javaCompile/taskHistory.bin b/android/.gradle/4.4/javaCompile/taskHistory.bin new file mode 100644 index 0000000..6325e49 Binary files /dev/null and b/android/.gradle/4.4/javaCompile/taskHistory.bin differ diff --git a/android/.gradle/4.4/javaCompile/taskJars.bin b/android/.gradle/4.4/javaCompile/taskJars.bin new file mode 100644 index 0000000..6848df3 Binary files /dev/null and b/android/.gradle/4.4/javaCompile/taskJars.bin differ diff --git a/android/.gradle/4.4/taskHistory/taskHistory.bin b/android/.gradle/4.4/taskHistory/taskHistory.bin new file mode 100644 index 0000000..3548e2c Binary files /dev/null and b/android/.gradle/4.4/taskHistory/taskHistory.bin differ diff --git a/android/.gradle/4.4/taskHistory/taskHistory.lock b/android/.gradle/4.4/taskHistory/taskHistory.lock new file mode 100644 index 0000000..b5f1efe Binary files /dev/null and b/android/.gradle/4.4/taskHistory/taskHistory.lock differ diff --git a/android/.gradle/4.6/fileChanges/last-build.bin b/android/.gradle/4.6/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/android/.gradle/4.6/fileChanges/last-build.bin differ diff --git a/android/.gradle/4.6/fileHashes/fileHashes.bin b/android/.gradle/4.6/fileHashes/fileHashes.bin new file mode 100644 index 0000000..84a0f50 Binary files /dev/null and b/android/.gradle/4.6/fileHashes/fileHashes.bin differ diff --git a/android/.gradle/4.6/fileHashes/fileHashes.lock b/android/.gradle/4.6/fileHashes/fileHashes.lock new file mode 100644 index 0000000..0ce9734 Binary files /dev/null and b/android/.gradle/4.6/fileHashes/fileHashes.lock differ diff --git a/android/.gradle/4.6/taskHistory/taskHistory.bin b/android/.gradle/4.6/taskHistory/taskHistory.bin new file mode 100644 index 0000000..02faf9b Binary files /dev/null and b/android/.gradle/4.6/taskHistory/taskHistory.bin differ diff --git a/android/.gradle/4.6/taskHistory/taskHistory.lock b/android/.gradle/4.6/taskHistory/taskHistory.lock new file mode 100644 index 0000000..5ffa1dc Binary files /dev/null and b/android/.gradle/4.6/taskHistory/taskHistory.lock differ diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..f65802c Binary files /dev/null and b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/android/.gradle/buildOutputCleanup/cache.properties b/android/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..ab979f0 --- /dev/null +++ b/android/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Oct 09 15:51:46 BRT 2018 +gradle.version=4.6 diff --git a/android/.gradle/buildOutputCleanup/outputFiles.bin b/android/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..496c8a8 Binary files /dev/null and b/android/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/android/.gradle/vcsWorkingDirs/gc.properties b/android/.gradle/vcsWorkingDirs/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/android/.idea/caches/build_file_checksums.ser b/android/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000..b633779 Binary files /dev/null and b/android/.idea/caches/build_file_checksums.ser differ diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/android/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml new file mode 100644 index 0000000..47bd81f --- /dev/null +++ b/android/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1.xml b/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1.xml new file mode 100644 index 0000000..9fbc5ef --- /dev/null +++ b/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1.xml b/android/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1.xml new file mode 100644 index 0000000..15c377e --- /dev/null +++ b/android/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1_jar.xml b/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1_jar.xml new file mode 100644 index 0000000..716c945 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1.xml b/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1.xml new file mode 100644 index 0000000..e7c4aea --- /dev/null +++ b/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1.xml b/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1.xml new file mode 100644 index 0000000..d9108d0 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1.xml b/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1.xml new file mode 100644 index 0000000..3be62f2 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1.xml b/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1.xml new file mode 100644 index 0000000..5d0eba3 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1.xml b/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1.xml new file mode 100644 index 0000000..6090d8b --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1.xml b/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1.xml new file mode 100644 index 0000000..b3c4f9f --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1.xml b/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1.xml new file mode 100644 index 0000000..cdc3160 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0_jar.xml b/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0_jar.xml new file mode 100644 index 0000000..9483343 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0_jar.xml b/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0_jar.xml new file mode 100644 index 0000000..e79b51d --- /dev/null +++ b/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3_jar.xml b/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3_jar.xml new file mode 100644 index 0000000..451f6ad --- /dev/null +++ b/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0_jar.xml b/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0_jar.xml new file mode 100644 index 0000000..53156fb --- /dev/null +++ b/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0_jar.xml b/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0_jar.xml new file mode 100644 index 0000000..6e28444 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4_jar.xml b/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4_jar.xml new file mode 100644 index 0000000..b73b8c8 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0_jar.xml b/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0_jar.xml new file mode 100644 index 0000000..9b8d115 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0_jar.xml b/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0_jar.xml new file mode 100644 index 0000000..6533c89 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0_jar.xml b/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0_jar.xml new file mode 100644 index 0000000..3236bd2 --- /dev/null +++ b/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2_jar.xml b/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2_jar.xml new file mode 100644 index 0000000..cae60c3 --- /dev/null +++ b/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650.xml b/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650.xml new file mode 100644 index 0000000..0dbb34e --- /dev/null +++ b/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml new file mode 100644 index 0000000..e0d5b93 --- /dev/null +++ b/android/.idea/misc.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/modules.xml b/android/.idea/modules.xml new file mode 100644 index 0000000..e54e28e --- /dev/null +++ b/android/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/android/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/android/.idea/workspace.xml b/android/.idea/workspace.xml new file mode 100644 index 0000000..3f32fff --- /dev/null +++ b/android/.idea/workspace.xml @@ -0,0 +1,1357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +