Class EncryptedValueParser

java.lang.Object
org.bouncycastle.cert.crmf.EncryptedValueParser

public class EncryptedValueParser extends Object
Parser for EncryptedValue structures.
  • Constructor Details Link icon

    • EncryptedValueParser Link icon

      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 Link icon

      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 Details Link icon

    • getIntendedAlg Link icon

      public org.bouncycastle.asn1.x509.AlgorithmIdentifier getIntendedAlg()
    • readCertificateHolder Link icon

      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 Link icon

      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 Link icon

      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.