Package org.bouncycastle.cert.crmf
Class EncryptedValueParser
- java.lang.Object
 - 
- org.bouncycastle.cert.crmf.EncryptedValueParser
 
 
- 
public class EncryptedValueParser extends java.lang.ObjectParser for EncryptedValue structures. 
- 
- 
Constructor Summary
Constructors Constructor Description EncryptedValueParser(org.bouncycastle.asn1.crmf.EncryptedValue value)Basic constructor - create a parser to read the passed in value.EncryptedValueParser(org.bouncycastle.asn1.crmf.EncryptedValue value, EncryptedValuePadder padder)Create a parser to read the passed in value, assuming the padder was applied to the data prior to encryption. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.x509.AlgorithmIdentifiergetIntendedAlg()X509CertificateHolderreadCertificateHolder(ValueDecryptorGenerator decGen)Read a X.509 certificate.char[]readPassphrase(ValueDecryptorGenerator decGen)Read a pass phrase.org.bouncycastle.asn1.pkcs.PrivateKeyInforeadPrivateKeyInfo(ValueDecryptorGenerator decGen)Read a PKCS#8 PrivateKeyInfo. 
 - 
 
- 
- 
Constructor Detail
- 
EncryptedValueParser
public EncryptedValueParser(org.bouncycastle.asn1.crmf.EncryptedValue value)
Basic constructor - create a parser to read the passed in value.- Parameters:
 value- the value to be parsed.
 
- 
EncryptedValueParser
public EncryptedValueParser(org.bouncycastle.asn1.crmf.EncryptedValue value, EncryptedValuePadder padder)Create a parser to read the passed in value, assuming the padder was applied to the data prior to encryption.- Parameters:
 value- the value to be parsed.padder- the padder to be used to remove padding from the decrypted value..
 
 - 
 
- 
Method Detail
- 
getIntendedAlg
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getIntendedAlg()
 
- 
readCertificateHolder
public X509CertificateHolder readCertificateHolder(ValueDecryptorGenerator decGen) throws CRMFException
Read a X.509 certificate.- Parameters:
 decGen- the decryptor generator to decrypt the encrypted value.- Returns:
 - an X509CertificateHolder containing the certificate read.
 - Throws:
 CRMFException- if the decrypted data cannot be parsed, or a decryptor cannot be generated.
 
- 
readPrivateKeyInfo
public org.bouncycastle.asn1.pkcs.PrivateKeyInfo readPrivateKeyInfo(ValueDecryptorGenerator decGen) throws CRMFException
Read a PKCS#8 PrivateKeyInfo.- Parameters:
 decGen- the decryptor generator to decrypt the encrypted value.- Returns:
 - an PrivateKeyInfo containing the private key that was read.
 - Throws:
 CRMFException- if the decrypted data cannot be parsed, or a decryptor cannot be generated.
 
- 
readPassphrase
public char[] readPassphrase(ValueDecryptorGenerator decGen) throws CRMFException
Read a pass phrase.- Parameters:
 decGen- the decryptor generator to decrypt the encrypted value.- Returns:
 - a pass phrase as recovered from the encrypted value.
 - Throws:
 CRMFException- if the decrypted data cannot be parsed, or a decryptor cannot be generated.
 
 - 
 
 -