crypt-php | decrypting data with symmetric encryption | Encryption library
kandi X-RAY | crypt-php Summary
kandi X-RAY | crypt-php Summary
crypt-php is class for encrypting and decrypting any data type in PHP. It uses libmcrypt and rjindael-192 (also known as AES192) algorithm. It tested on Mac OS X server and some (Ubuntu and Centos) Linux distributions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Decrypts the data
- Encrypt the data
- Checks the environment .
- Sets the secret key
- Get the complex types .
- Sets the complex types .
- Set the data .
- Get the data .
- Get the cache key .
- Get the module .
crypt-php Key Features
crypt-php Examples and Code Snippets
Community Discussions
Trending Discussions on crypt-php
QUESTION
I am newbie in PHP and I was trying to achieve the CryptoJS AES encryption equivalent in PHP. I saw this post but unfortunately I was not able to achieve the same. I was getting a different output in PHP code as encrypted string.
Where did I go wrong?
Javascript Code
...ANSWER
Answered 2022-Feb-28 at 14:15As @Topaco pointed out in comments, the key and IV must not be hex decoded, i.e. remove both hex2bin().
The corrected code is given below.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install crypt-php
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page