Comments (6)
@danang-id Thanks for all your hard work, and thanks for being so quick to respond. Closing this PR as no further work needs to be done. 👍
from simple-crypto-js.
Yup, this is come after 2.4.0 update with the assumption that empty string is not subject to encryption. I could agree to disable empty string check. As the goals of this library is to be simple, I don't see an optional configuration is coming.
Beside that snippet you provide, empty string check happens 3 times here.
simple-crypto-js/src/SimpleCrypto.ts
Line 51 in 0ccd426
simple-crypto-js/src/SimpleCrypto.ts
Lines 172 to 174 in 0ccd426
simple-crypto-js/src/SimpleCrypto.ts
Lines 206 to 208 in 0ccd426
You may, if you wish, provide a PR to remove empty string check.
from simple-crypto-js.
@danang-id Thank you! PR coming shortly. 😁
from simple-crypto-js.
@danang-id As I began working on this PR i noticed that this snippet you linked me:
simple-crypto-js/src/SimpleCrypto.ts
Lines 172 to 174 in 0ccd426
This snippet isn't validating whether a plain string is empty, but whether the cypher text is empty. I don't think I should remove this, correct?
from simple-crypto-js.
Merged PR #22
from simple-crypto-js.
This snippet isn't validating whether a plain string is empty, but whether the cypher text is empty. I don't think I should remove this, correct?
@TransmissionsDev The empty string check of _dataBuffer
in _decrypt()
is actually useless because of the _dataBuffer
length check that happens after the empty string check.
simple-crypto-js/src/SimpleCrypto.ts
Lines 176 to 178 in 0ccd426
The empty string check on _decrypt()
will also be removed.
from simple-crypto-js.
Related Issues (20)
- compatible with react-native? HOT 1
- SimpleCrypto is Vulnerable to Chosen-Ciphertext Attacks HOT 7
- Warning - crypto-js is currently broken
- Is there an implementation of this lib in PHP? HOT 1
- BUG: SimpleCrypto sees two numbers at the beginning of a string and encrypts it as a number, cutting off the rest of the string. HOT 10
- Error: Unable to resolve module `crypto` from `node_modules/simple-crypto-js/node_modules/crypto-js/core.js`: crypto could not be found within the project HOT 3
- Not working anymore in React Native / Expo HOT 4
- Differents behavior on differents env HOT 1
- Getting "Error: Invalid encrypted text received. Decryption halted" while decryption HOT 8
- 0 gets removed when encrypting a number string with leading 0 HOT 2
- Consider adding backward compatiblity HOT 6
- Cannot use namespace 'WordArray' as a type - TypeScript 3 HOT 1
- How to change cipherText length
- Big numbers don't work HOT 1
- How do I determine the IV being used?
- Invalid encrypted text received. Decryption halted HOT 1
- Typescript: Cannot find namespace (lib)
- Typescript: failed to parse source map
- Since crypto-js 4.2 (yesterday) decryption of previously encrypted values fail
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 simple-crypto-js.