Comments (5)
Thanks for your message!
Unfortunately, there is no alternative to the @sounisi5011/encrypted-archive
package. The data generated by this package is in a format specific to this package. Since I designed it, there is no other implementation.
However, the data format uses unsigned varint and Protocol Buffers, so you should be able to decrypt the file without using this package. All you need is:
-
A decipher function that supports AES-GCM (256-bit) or ChaCha20-Poly1305
You can use the Node.js built-in
crypto
module for this. -
An Argon2 implementation
This package uses
argon2-browser
, butargon2
is also available.
It's interesting that @sounisi5011/encrypted-archive
doesn't work in React Native. I'm not familiar with React Native, but I'll try to fix it as best I can.
If possible, could you please provide the following information?
- Version of React Native and Node.js
- Target platform for your app - iOS, Android, etc.
- The operating system used to build - In other words, the operating system of the computer you are using to develop.
- Circumstances in which the problem occurs - When you build, launch an app, try to decrypt, etc.
- Problem details - Error messages are generated, apps are force-quit, decryption always fails, etc.
from npm-packages.
Thank you for your answer @sounisi5011.
React Native does not have the same modules as nodejs, that's why compatibility is not there by default. Here are some details about my current setup :
- react native: v0.66
- nodejs: v16
- os: macos 12.01
The problem happens when I try to decrypt a file, just as I import the decrypt function (the app crashes)
from npm-packages.
I am still aware of this issue. However, I can't fix it for now because I can't build Native Modules for React Native.
At the very least, @sounisi5011/encrypted-archive
requires an Argon2 library that supports binary data input. However, the React Native-compatible Argon2 library that currently exists in npm only accepts string input. For this reason, I need to choose one of the following:
- create my own React Native-compatible Argon2 library
- send a pull request to the existing Argon2 library
- wait until React Native supports WebAssembly
At first, I tried 1. However, I could not build React Native on my macOS using XCode and CocoaPods. I get an unknown error, and moreover, the error is not reproducible. I could not even choose 2 because I could not build it in my local environment.
With react-native-wasm, I can solve this problem without waiting for 3. But methods like react-native-wasm use WebView. I think the way a mere encryption/decryption library calls WebView has a fatal negative impact on the performance of an app using @sounisi5011/encrypted-archive
.
Writing again, I am still aware of this issue. I have not forgotten about it.
But now I'm stuck and left it.
I will keep this Issue open until it is resolved, but I don't know when I will be able to resolve it (possibly I will have to get a new Mac to use for development only).
from npm-packages.
Interim report: Currently, I'm using React Native, which I built at Expo, to conduct my research.
- https://github.com/sounisi5011/react-native-test--using-sounisi5011-encrypted-archive
- sounisi5011/react-native-test--using-sounisi5011-encrypted-archive#2 (comment)
Since the @sounisi5011/encrypted-archive
package was designed for Node.js, it depends on many built-in modules that React Native does not support. These can be solved by editing metro.config.js
. However, a more serious problem was found. Support is going to take a long time.
from npm-packages.
Thank you for your time @sounisi5011. On my side, I try to implement a decrypt without this package as you described before.
from npm-packages.
Related Issues (13)
- Use "lage" instead of "pnpm recursive" HOT 1
- Dependency Dashboard
- Simplify tsconfig.base.json using @tsconfig/node12
- Using actionlint to lint GitHub Actions workflows HOT 1
- Using Clipanion to create a type-safe CLI tools
- `pnpx` command is deprecated!
- Using `eslint-plugin-eslint-comments`
- Node.js v15 is EOL and released Node.js v16 and v17 HOT 2
- [`@sounisi5011/encrypted-archive`] Disallow weak Argon2 options
- [`@sounisi5011/encrypted-archive`] Maybe the `compress` option should be deprecated
- [`@sounisi5011/ts-utils-is-property-accessible`] can not import from CommonJS TypeScript files HOT 1
- [`@sounisi5011/encrypted-archive`] `word-join` package can be replaced by `Intl.ListFormat`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-packages.