-
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
Encryption in PHP and Decrypt in JS #483
Comments
any updates? |
This solution should workimport CryptoJS from "crypto-js"; var encryptedData ="base64encoded_encrypted_data"; var key = CryptoJS.enc.Utf8.parse("your_key"); var decryptedData = CryptoJS.AES.decrypt( var decryptedText = decryptedData.toString(CryptoJS.enc.Utf8); |
Any one facing this issue, This is what worked for me :
PHP : Laravel
|
Hi, there I want to encrypt my MFA Code in PHP and decrypt that code in JS so that on my network only the encrypted data will be shared.
To achieve this I have followed this in my PHP
And to decrypt the code in the frontend have used
But I am getting an empty string in response. Also, the same issue has already #135 created but there was no solution for that there. Please can anyone help me on how to resolve this?
The text was updated successfully, but these errors were encountered: