package org.bouncycastle.cms;

import java.security.GeneralSecurityException;
import java.security.Provider;
import java.security.SecureRandom;

import javax.crypto.SecretKey;

import org.bouncycastle.asn1.cms.RecipientInfo;

interface RecipientInfoGenerator
{
    /**
     * Generate a RecipientInfo object for the given key.
     * @param key
     * @param random
     * @param prov
     * @return
     * @throws GeneralSecurityException
     */
    RecipientInfo generate(SecretKey key, SecureRandom random,
        Provider prov) throws GeneralSecurityException;
}

@@ -341,63 +341,206 @@
  key
-%0A     * @param random%0A     * @param prov%0A     * @return
+ the %3Ccode%3ESecretKey%3C/code%3E to encrypt%0A     * @param random a source of randomness%0A     * @param prov the default provider to use%0A     * @return a %3Ccode%3ERecipientInfo%3C/code%3E object for the given key
 %0A   

Add javadoc