We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While trying to use the 'hash' method on Android, I was getting the same error that the PR #395 fixed. I did a local fix to have ti working.
Is there any possibility of fixing the hash method? Below is my fix.
if (!algorithms.containsKey(algorithm)) throw new Exception("Invalid hash algorithm"); // File file = new File(filepath); // if (file.isDirectory()) { // rejectFileIsDirectory(promise); // return; // } // if (!file.exists()) { // rejectFileNotFound(promise, filepath); // return; // } MessageDigest md = MessageDigest.getInstance(algorithms.get(algorithm)); // FileInputStream inputStream = new FileInputStream(filepath); // byte[] buffer = new byte[(int) file.length()]; InputStream inputStream = getInputStream(filepath); byte[] buffer = new byte[1024];
The text was updated successfully, but these errors were encountered:
I use this package only for the file hash function. I made a fork temporarily with the above fix if anyone else only cares about the hash function. https://github.com/andrewkvavlewhite/react-native-fs
Sorry, something went wrong.
I wonder why nobody send a PR with this fix? I have changed now the buffer creation to a fix buffer size of 10 KB in the hash-function.
Please find the fix in latest release of v2.9.10
Thanks. it is working
No branches or pull requests
While trying to use the 'hash' method on Android, I was getting the same error that the PR #395 fixed.
I did a local fix to have ti working.
Is there any possibility of fixing the hash method?
Below is my fix.
The text was updated successfully, but these errors were encountered: