Add AES encryption and better random numbers FS#2685

This adds truly random numbers using the OpenSSL or mcrypt extension if available and replaces the deprecated and broken Blowfish implementation by the AES implementation from phpseclib.