private void tryKekAlgorithm(SecretKey kek, DERObjectIdentifier algOid)
throws NoSuchAlgorithmException, NoSuchProviderException, CMSException
{
byte[] data = "WallaWallaWashington".getBytes();
CMSEnvelopedDataGenerator edGen = new CMSEnvelopedDataGenerator();
byte[] kekId = new byte[] { 1, 2, 3, 4, 5 };
edGen.addKEKRecipient(kek, kekId);
CMSEnvelopedData ed = edGen.generate(
new CMSProcessableByteArray(data),
CMSEnvelopedDataGenerator.DES_EDE3_CBC, "BC");
RecipientInformationStore recipients = ed.getRecipientInfos();