Commit Graph

8 Commits

Author SHA1 Message Date
Nikita Popov
7810659cc3 Removed deprecated mcrypt_ecb() etc 2015-03-09 11:37:13 +01:00
Nikita Popov
e5738d3bc9 Provide expected IV length in IV error messages 2014-03-05 15:32:32 +01:00
Nikita Popov
a861a3a93d Abort on invalid key size
Previously an incorrectly sized key was either silently padded
with NUL bytes or truncated. Especially the silent nature of this
behavior makes it extremely easy to use weak encryption. A common
mistake - which has also been extensively made in our tests - is
to use a password instead of a key.

Incorrectly sized keys will now be rejected.
2014-03-05 15:32:32 +01:00
Nikita Popov
25d801f97e Abort on missing IV if the enc_mode requires it
Previously the code fell back on using a NUL IV if no IV was
passed and the encryption mode required it. This is dangerous and
makes no sense from a practical point of view (as you could just
as well use ECB then).
2014-03-05 15:32:31 +01:00
Sherif Ramadan
7014a0eb6d Fixed Mcrypt deprecated functions and related tests 2012-08-16 10:21:22 -04:00
Derick Rethans
3657b0ab5c - Revert that crap. 2008-07-04 07:47:18 +00:00
Pierre Joye
f0ec9b9475 - fix mcrypt_iv on windows, use urandom equivalent
- MFH, code cleaning and reorganisation
2008-07-03 13:50:14 +00:00
David Soria Parra
3e52aaf16d MFH: Tests from Munich PHP Testfest 2008 2008-05-17 23:29:14 +00:00