-
Notifications
You must be signed in to change notification settings - Fork 12
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
decrypt encrypted text with php? #18
Comments
The encryption is done with standard AES-256 in CBC mode. Any language with OpenSSL bindings should be able to decrypt it. I'm not particularly familiar with PHP but looks like it'd be The key used to perform the AES operation is the SHA-256 of the text key option: node-simple-encryptor/index.js Line 32 in 707b47a
The output format is documented here: node-simple-encryptor/index.js Lines 41 to 74 in 707b47a
You'd need to split out the pieces, convert them hex to bytes, and then you should be able to invoke the corresponding OpenSSL functions to decrypt it. The JS code for this library is purposely verbose and should match up with the same steps in other languages: node-simple-encryptor/index.js Lines 82 to 118 in 707b47a
|
Has anyone used PHP to decrypt the encrypted text with this package?
I am wanting to make something in PHP that can decrypt and use something from my database which was encrypted with this package. But not sure where and how to get started.
The text was updated successfully, but these errors were encountered: