FileDocCategorySizeDatePackage
EncryptedPrivateKeyInfo.javaAPI DocAzureus 3.0.3.41843Tue Jun 08 05:12:58 BST 2004org.bouncycastle.asn1.pkcs

EncryptedPrivateKeyInfo

public class EncryptedPrivateKeyInfo extends Object implements org.bouncycastle.asn1.DEREncodable, PKCSObjectIdentifiers

Fields Summary
private org.bouncycastle.asn1.x509.AlgorithmIdentifier
algId
private org.bouncycastle.asn1.ASN1OctetString
data
Constructors Summary
public EncryptedPrivateKeyInfo(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration e = seq.getObjects();

        algId = new AlgorithmIdentifier((ASN1Sequence)e.nextElement());
        data = (ASN1OctetString)e.nextElement();
    
public EncryptedPrivateKeyInfo(org.bouncycastle.asn1.x509.AlgorithmIdentifier algId, byte[] encoding)

        this.algId = algId;
        this.data = new DEROctetString(encoding);
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()
Produce an object suitable for an ASN1OutputStream.
EncryptedPrivateKeyInfo ::= SEQUENCE {
encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
encryptedData EncryptedData
}

EncryptedData ::= OCTET STRING

KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
... -- For local profiles
}

        ASN1EncodableVector v = new ASN1EncodableVector();

        v.add(algId);
        v.add(data);

        return new DERSequence(v);
    
public byte[]getEncryptedData()

        return data.getOctets();
    
public org.bouncycastle.asn1.x509.AlgorithmIdentifiergetEncryptionAlgorithm()

        return algId;