Comments (4)
I used JS Beautifier to get the code like that btw, if you wonder why my file
is not minified.
http://jsbeautifier.org/
Original comment by [email protected]
on 3 Aug 2014 at 2:54
- Added labels: ****
- Removed labels: ****
from crypto-js.
also, I use js FileReader with reader.readAsBinaryString to open my file.
Original comment by [email protected]
on 3 Aug 2014 at 2:58
- Added labels: ****
- Removed labels: ****
from crypto-js.
So, the issue is that JavaScript strings are UTF-16, always. When you
readAsBinaryString, of course, only a small subset of JavaScript's possible
characters are used, but CryptoJS has no way to know that. In hindsight, I
probably should have required the library user to always specify the character
encoding of the input. Instead, the current behavior is that if you don't
specify the character encoding (by first converting to bytes), then UTF-8 is
picked as the default.
Original comment by Jeff.Mott.OR
on 3 Aug 2014 at 3:51
- Added labels: ****
- Removed labels: ****
from crypto-js.
We may not know the character encoding, it's hard to deal with character
encoding when it come to a file.
For example: a UTF8-NoBom encoded file give you no hint about its current
encoding, you need to parse the first character and determine what encoding it
is, when this is done automatically when running a webserver like apache2, this
task adds alot of code on the developper side who would use the API.
I don't know about UTF-16 and JavaScript strings but I can guarranty that any
non-AINSII encoding mismatch between my checksum tool and the output the
website gave me.
I don't know how much it affect users that will use this library only for
normal strings (instead of output from a file), it would probably don't affect
them at all... ? I don't see a case where you could have a mismatch of hash
since the string will be coded INSIDE the file anyway.
Original comment by [email protected]
on 3 Aug 2014 at 5:54
- Added labels: ****
- Removed labels: ****
from crypto-js.
Related Issues (20)
- DES and 3DES work only on alphabets
- CryptoJS.SHA3 does not pass any Keccak test vectors, it is completely broken HOT 2
- use padding option on AES.decrypt results in endless loading HOT 3
- Unnecessary padding HOT 3
- AES encrypted string to be converted to base 64 string and then to byte array in Javascript
- Uncaught TypeError: Cannot read property 'init' of undefined HOT 1
- Clarify license HOT 2
- Automatic key expiration
- Type a is undefined in rollup version of aes.js line 27. HOT 4
- Crypto.JS PBKDF2 Results Differnt then .Net Rfc2898DeriveBytes HOT 1
- Crypto-js decryption implemention HOT 1
- Not able to decrypt the encrypted data on server side which was encrypted using CryproJS on client side..
- TripleDES result is different each time, and is not correct
- AES 256 decrypt from data oracle function encrypting HOT 1
- Broken hashing with sigBytes< bytes
- Error: Unable to get property 'createEncryptor' of undefined or null reference
- [IE8]Object doesn't support property or method
- decrypt of ciphertext not working for strings HOT 1
- [documentation] Add recommendation to use https
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 crypto-js.