cipher.init(Cipher.ENCRYPT_MODE, encKey, params, rand);
BERSequenceGenerator eiGen = new BERSequenceGenerator(envGen.getRawOutputStream());
eiGen.addObject(PKCSObjectIdentifiers.data);
//
// If params are null we try and second guess on them as some providers don't provide
// algorithm parameter generation explicitly but instead generate them under the hood.
//