Bouncy Castle Cryptography Library 1.59

org.bouncycastle.cert.crmf
Class EncryptedValueParser

java.lang.Object
  extended byorg.bouncycastle.cert.crmf.EncryptedValueParser

public class EncryptedValueParser
extends java.lang.Object

Parser for EncryptedValue structures.


Constructor Summary
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
 X509CertificateHolder readCertificateHolder(ValueDecryptorGenerator decGen)
          Read a X.509 certificate.
 char[] readPassphrase(ValueDecryptorGenerator decGen)
          Read a pass phrase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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.

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.

Bouncy Castle Cryptography Library 1.59