-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
CryptoJS.enc: stringify()
Not Working with Word Arrays
#459
Comments
Updated the issue as it turned out that Please update the docs:
|
I did read the docs several times again and still didn't get any clue what could be wrong. Decided to check out the code of As Please update the docs:
|
When building a After changing the code (as following) the member
Conclusion: CryptoJS should always use only one of the specified keys.
Additionally the docs should be updated:
|
When using
CryptoJS.enc.Hex.stringify(decrypted)
to convert the result of an AES decryption, then the result is always an empty string, although the WordArray contains 8 values.When using
CryptoJS.enc.Base64.stringify(decrypted)
the exceptionRangeError: invalid array length
is thrown.So
stringify()
is not working, although using it as specified in the documentation paragraph "Encoders".Please fix.
A special case that I have seen are negative values inside the WordArray.
My use case with CryptoJS 4.1.1 in latest Mozilla browser (incl. my workaround):
WordArray
decrypted
:Expected result:
The text was updated successfully, but these errors were encountered: