Reorganize MessageEncryptor's _encrypt

According to the OpenSSL documentation cipher.random_iv must be called after cipher.encrypt and already sets the generated IV on the cipher.