Bouncy Castle Cryptography Library 1.79

org.bouncycastle.cert.crmf
Class EncryptedValueParser

java.lang.Object
  |
  +--org.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
 org.bouncycastle.asn1.x509.AlgorithmIdentifier getIntendedAlg()
           
 X509CertificateHolder readCertificateHolder(ValueDecryptorGenerator decGen)
          Read a X.509 certificate.
 char[] readPassphrase(ValueDecryptorGenerator decGen)
          Read a pass phrase.
 org.bouncycastle.asn1.pkcs.PrivateKeyInfo readPrivateKeyInfo(ValueDecryptorGenerator decGen)
          Read a PKCS#8 PrivateKeyInfo.
 
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

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.

Bouncy Castle Cryptography Library 1.79