01: package org.bouncycastle.asn1.pkcs;
02:
03: import org.bouncycastle.asn1.ASN1EncodableVector;
04: import org.bouncycastle.asn1.ASN1Sequence;
05: import org.bouncycastle.asn1.DERObject;
06: import org.bouncycastle.asn1.DERSequence;
07: import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
08:
09: public class EncryptionScheme extends AlgorithmIdentifier {
10: DERObject objectId;
11: DERObject obj;
12:
13: EncryptionScheme(ASN1Sequence seq) {
14: super (seq);
15:
16: objectId = (DERObject) seq.getObjectAt(0);
17: obj = (DERObject) seq.getObjectAt(1);
18: }
19:
20: public DERObject getObject() {
21: return obj;
22: }
23:
24: public DERObject getDERObject() {
25: ASN1EncodableVector v = new ASN1EncodableVector();
26:
27: v.add(objectId);
28: v.add(obj);
29:
30: return new DERSequence(v);
31: }
32: }
|