Skip to content
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

.toString() or .toString(CryptoJS.enc.Base64) not working with WebKit #405

Open
zigazajc007 opened this issue Feb 14, 2022 · 3 comments
Open

Comments

@zigazajc007
Copy link

zigazajc007 commented Feb 14, 2022

Hello,

In Webkit .toString is not working. I'm using sha512 and AES encryption. I have managed to fix the problem for SHA512 by replacing

CryptoJS.SHA512("text").toSting()

to

CryptoJS.enc.Hex.stringify(CryptoJS.SHA512("text"))

I have also managed to fix AES decryption with replacing

CryptoJS.AES.decrypt("text", "password").toString(CryptoJS.enc.Utf8)

to

CryptoJS.enc.Utf8.stringify(CryptoJS.AES.decrypt("text", "password"))

But now I have a problem with AES Encryption. I don't know how I would get encrypted String without toString()
I want to get a String that is written in line 16:
image

I have tried with formatting key, iv, salt... with

CryptoJS.format.OpenSSL.stringify()
CryptoJS.kdf.OpenSSL.execute()
...

without any success.

@smokeyhallow
Copy link

Any updates on this? I don't understand how to get a simple encrypted cipher text! Somethings thats compatible with OpenSSL decrypt would be great!

@zigazajc007
Copy link
Author

Any updates on this? I don't understand how to get a simple encrypted cipher text! Somethings thats compatible with OpenSSL decrypt would be great!

I have made my own XChaCha20 implementation (https://github.com/Rabbit-Company/XChaCha20-JS) and I'm also currently working on Argon2id implementation in plain JS.

@windsurfer1122
Copy link

My issue #459 seems to be related. I use a workaround for Hex.stringify(), also documented in my issue,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants