made changes to decrypt()

made changes to decrypt(), can now use array based cookies, as in MyBB.

Please review the code 4 times before merging.

I have also made a issue for this. #3192