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

PBES2Algorithms

public class PBES2Algorithms extends org.bouncycastle.asn1.x509.AlgorithmIdentifier implements PKCSObjectIdentifiers
deprecated
- use AlgorithmIdentifier and PBES2Params

Fields Summary
private org.bouncycastle.asn1.DERObjectIdentifier
objectId
private KeyDerivationFunc
func
private EncryptionScheme
scheme
Constructors Summary
public PBES2Algorithms(org.bouncycastle.asn1.ASN1Sequence obj)

        super(obj);

        Enumeration     e = obj.getObjects();

        objectId = (DERObjectIdentifier)e.nextElement();

        ASN1Sequence seq = (ASN1Sequence)e.nextElement();

        e = seq.getObjects();

        ASN1Sequence  funcSeq = (ASN1Sequence)e.nextElement();

        if (funcSeq.getObjectAt(0).equals(id_PBKDF2))
        {
            func = new PBKDF2Params(funcSeq);
        }
        else
        {
            func = new KeyDerivationFunc(funcSeq);
        }

        scheme = new EncryptionScheme((ASN1Sequence)e.nextElement());
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()

        ASN1EncodableVector  v = new ASN1EncodableVector();
        ASN1EncodableVector  subV = new ASN1EncodableVector();

        v.add(objectId);

        subV.add(func);
        subV.add(scheme);
        v.add(new DERSequence(subV));

        return new DERSequence(v);
    
public EncryptionSchemegetEncryptionScheme()

        return scheme;
    
public KeyDerivationFuncgetKeyDerivationFunc()

        return func;
    
public org.bouncycastle.asn1.DERObjectIdentifiergetObjectId()

        return objectId;