Package org.bouncycastle.cert.crmf
Class EncryptedValueParser
java.lang.Object
org.bouncycastle.cert.crmf.EncryptedValueParser
Parser for EncryptedValue structures.
-
Constructor Summary
ConstructorsConstructorDescriptionEncryptedValueParser
(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
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.AlgorithmIdentifier
Read a X.509 certificate.char[]
Read a pass phrase.org.bouncycastle.asn1.pkcs.PrivateKeyInfo
Read a PKCS#8 PrivateKeyInfo.
-
Constructor Details
-
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 Details
-
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
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.
-