Merge pull request #34 from Naxiz/master

Check for valid key size (of the default cipher MCRYPT_RIJNDAEL_256)
Improve code slightly
Little fix for HTTPS detection

Use !empty() instead of isset() because if $_SERVER['HTTPS'] was just an empty string it still got detected as HTTPS.