Adding a fix for #5463
Added test provided by original reporter of #5463
Merge pull request #5476 from cakephp/3.0-matching-fixes

3.0 matching fixes
Start splitting up encryption code.

Using a pluggable system will let us reduce our reliance on mcrypt and
remove the hard requirement on mcrypt. It will also enable us to have an
SSL adapter for more maintained library implementations.
Work more on crypto instances.

OpenSSL does not support 256bit blocksized AES, this means we cannot
provide a compatible implementation or rijndael.

Make the engine() method accept an instance so that developers can force
mcrypt/openssl as necessary.
Fix and implement cross engine decryption.

Sort out the nasty problems that were preventing Mcrypt and OpenSSL
backends from decrypting each others ciphertext.

Add a test to show how each engine can decode its own and the other's
cipher texts.