Package org.bouncycastle.cms
Class PasswordRecipientInfoGenerator
- java.lang.Object
-
- org.bouncycastle.cms.PasswordRecipientInfoGenerator
-
- All Implemented Interfaces:
RecipientInfoGenerator
- Direct Known Subclasses:
BcPasswordRecipientInfoGenerator,JcePasswordRecipientInfoGenerator
public abstract class PasswordRecipientInfoGenerator extends java.lang.Object implements RecipientInfoGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected char[]password
-
Constructor Summary
Constructors Modifier Constructor Description protectedPasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password)protectedPasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password, int keySize, int blockSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract byte[]calculateDerivedKey(int schemeID, org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm, int keySize)org.bouncycastle.asn1.cms.RecipientInfogenerate(GenericKey contentEncryptionKey)protected abstract byte[]generateEncryptedBytes(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm, byte[] derivedKey, GenericKey contentEncryptionKey)PasswordRecipientInfoGeneratorsetPasswordConversionScheme(int schemeID)PasswordRecipientInfoGeneratorsetPRF(PasswordRecipient.PRF prf)PasswordRecipientInfoGeneratorsetSaltAndIterationCount(byte[] salt, int iterationCount)PasswordRecipientInfoGeneratorsetSecureRandom(java.security.SecureRandom random)
-
-
-
Constructor Detail
-
PasswordRecipientInfoGenerator
protected PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password)
-
PasswordRecipientInfoGenerator
protected PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password, int keySize, int blockSize)
-
-
Method Detail
-
setPasswordConversionScheme
public PasswordRecipientInfoGenerator setPasswordConversionScheme(int schemeID)
-
setPRF
public PasswordRecipientInfoGenerator setPRF(PasswordRecipient.PRF prf)
-
setSaltAndIterationCount
public PasswordRecipientInfoGenerator setSaltAndIterationCount(byte[] salt, int iterationCount)
-
setSecureRandom
public PasswordRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)
-
generate
public org.bouncycastle.asn1.cms.RecipientInfo generate(GenericKey contentEncryptionKey) throws CMSException
- Specified by:
generatein interfaceRecipientInfoGenerator- Throws:
CMSException
-
calculateDerivedKey
protected abstract byte[] calculateDerivedKey(int schemeID, org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm, int keySize) throws CMSException- Throws:
CMSException
-
generateEncryptedBytes
protected abstract byte[] generateEncryptedBytes(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm, byte[] derivedKey, GenericKey contentEncryptionKey) throws CMSException- Throws:
CMSException
-
-