public class PKCS8EncryptedPrivateKeyInfo
extends java.lang.Object
| Constructor and Description |
|---|
PKCS8EncryptedPrivateKeyInfo(byte[] encryptedPrivateKeyInfo)
Parse a BER/DER encoded EncryptedPrivateKeyInfo.
|
PKCS8EncryptedPrivateKeyInfo(org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo encryptedPrivateKeyInfo)
Wrap an existing parsed
EncryptedPrivateKeyInfo structure. |
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.pkcs.PrivateKeyInfo |
decryptPrivateKeyInfo(InputDecryptorProvider inputDecryptorProvider)
Decrypt the wrapped private key.
|
byte[] |
getEncoded()
Return the default (DER) encoding of this EncryptedPrivateKeyInfo.
|
byte[] |
getEncryptedData()
Return the raw ciphertext bytes of the encrypted private key.
|
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getEncryptionAlgorithm()
Return the algorithm identifier describing how the private key has been encrypted.
|
org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo |
toASN1Structure()
Return the underlying ASN.1 structure for this holder.
|
public PKCS8EncryptedPrivateKeyInfo(org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo encryptedPrivateKeyInfo)
EncryptedPrivateKeyInfo structure.encryptedPrivateKeyInfo - the ASN.1 structure to wrap.public PKCS8EncryptedPrivateKeyInfo(byte[] encryptedPrivateKeyInfo)
throws java.io.IOException
encryptedPrivateKeyInfo - the encoded bytes.java.io.IOException - if the data is not a valid EncryptedPrivateKeyInfo encoding.public org.bouncycastle.asn1.x509.AlgorithmIdentifier getEncryptionAlgorithm()
public byte[] getEncryptedData()
public org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo toASN1Structure()
public byte[] getEncoded()
throws java.io.IOException
java.io.IOException - if encoding fails.public org.bouncycastle.asn1.pkcs.PrivateKeyInfo decryptPrivateKeyInfo(InputDecryptorProvider inputDecryptorProvider) throws PKCSException
inputDecryptorProvider - provider able to produce a decryptor matching the
encryption algorithm carried by this object.PrivateKeyInfo.PKCSException - if a decryptor cannot be created or decryption / parsing fails.