Welcome Guest, Not a member yet? Register   Sign In
AES Encryption without Mcrypt library
#1

Is there a free and pure PHP library for AES Encryption?

Thanks
Reply
#2

i have not tried this library but you could giver a go:

phpCrypt: https://github.com/gilfether/phpcrypt

Description from the github page:

phpCrypt is an encryption library written in PHP from scratch. It aims to implement all major encryption ciphers, modes, and other tools used for encryption and decryption. phpCrypt does not rely on mCrypt, other PHP extentions, or PEAR libraries
Reply
#3

https://github.com/ivantcholakov/gibberish-aes-php

This class tries ti use openssl_*() functions at first place, if they don't exist then uses mcrypt. If you want not to depend on mcrypt, your PHP version should be minimum 5.3.3.

See also this CodeIgniter compatible wrapper library:
https://github.com/ivantcholakov/starter...berish.php
Reply
#4

(10-30-2014, 08:21 PM)ivantcholakov Wrote: https://github.com/ivantcholakov/gibberish-aes-php

This class tries ti use openssl_*() functions at first place, if they don't exist then uses mcrypt. If you want not to depend on mcrypt, your PHP version should be minimum 5.3.3.

See also this CodeIgniter compatible wrapper library:
https://github.com/ivantcholakov/starter...berish.php

Well, at least the name is approprate. Big Grin

Seriously though, just upgrade to CI 3.0-dev, the new Encryption library in it can work without Mcrypt.
Reply
#5

The Encryption library is like a Swiss knife and it needs some boilerplate code for achieving the desired encryption algorithm. This may be not convenient for all, there are details to be understood. I also think, its default algorithm choice could be AES 256 CBC for good.

What I did is a compatible implementation in PHP from a JavaScript project called "Gibberish AES" https://github.com/mdp/gibberish-aes This is where this funny name comes from, but the work is serious.
Reply
#6

(10-31-2014, 06:22 PM)ivantcholakov Wrote: The Encryption library is like a Swiss knife and it needs some boilerplate code for achieving the desired encryption algorithm. This may be not convenient for all, there are details to be understood. I also think, its default algorithm choice could be AES 256 CBC for good.

It uses AES-128-CBC by default and you don't need any boilerplate code to use that.

(10-31-2014, 06:22 PM)ivantcholakov Wrote: What I did is a compatible implementation in PHP from a JavaScript project called "Gibberish AES" https://github.com/mdp/gibberish-aes This is where this funny name comes from, but the work is serious.

Yes, I saw that it's just a port of another library ... and "gibberish" is very appropriate for that library. It doesn't do a lot of things right if at all.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB