tebru / aes-encryption Goto Github PK
View Code? Open in Web Editor NEWAES Encryption in PHP
AES Encryption in PHP
Hello,
we have a warning on php 7.4.x
Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP)
can you change these two lines
/**#@+
* Encryption constants
*/
const ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128;
const ENCRYPTION_MODE = MCRYPT_MODE_CBC;
/**#@-*/
By
/**#@+
* Encryption constants
*/
const ENCRYPTION_CIPHER = "rijndael-128";
const ENCRYPTION_MODE = "cbc";
/**#@-*/
When using composer install or composer update it gives this warning
Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.
Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.
Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.
And after that , if i use the class It gives the error Class 'AesEncrypter' not found
my composer.json is
{
"autoload": {
"psr-4": {
"\":"."
}
},
"require-dev": {
"phpunit/phpunit": "^7",
"phpdocumentor/phpdocumentor": "2.*"
},
"require": {
"tebru/aes-encryption": "^0.3.0"
}
}
@defuse @paragonie-scott I wrote this library before defuse/php-encryption was compliant with various PSR standards. I see now that you are, and will be switching over once v2 is released as you put way more work and time into it than I am able to.
If you have time, I'd appreciate it if you could take a look at what I've done. I believe I referenced a blog one of you wrote when I was building this library. While I'm not an expert, security related issues interest me, and I'd be curious so see what I did wrong.
as title
It gives me encrypted strings like
U2FsdGVkX18t7m4RKL0DRM46yjp1gmddZFhFQNBugF2uDvR0sD6txedKmmbpTKMp2+4JODOuHqSMJgDwPJ0xNA==
But I can't decrypt it. Even when using services like https://www.devglan.com/online-tools/aes-encryption-decryption, it gives the following error:
Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
How to resolve this ? how can i get a base64 encoded string ? @natebrunette
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.