Search in sources :

Example 91 with ASN1EncodableVector

use of com.android.org.bouncycastle.asn1.ASN1EncodableVector in project XobotOS by xamarin.

the class PBEParameter method toASN1Object.

public DERObject toASN1Object() {
    ASN1EncodableVector v = new ASN1EncodableVector();
    v.add(salt);
    v.add(iterations);
    return new DERSequence(v);
}
Also used : DERSequence(org.bouncycastle.asn1.DERSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector)

Example 92 with ASN1EncodableVector

use of com.android.org.bouncycastle.asn1.ASN1EncodableVector in project XobotOS by xamarin.

the class PBES2Algorithms method getDERObject.

public DERObject getDERObject() {
    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);
}
Also used : DERSequence(org.bouncycastle.asn1.DERSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector)

Example 93 with ASN1EncodableVector

use of com.android.org.bouncycastle.asn1.ASN1EncodableVector in project XobotOS by xamarin.

the class PBKDF2Params method toASN1Object.

public DERObject toASN1Object() {
    ASN1EncodableVector v = new ASN1EncodableVector();
    v.add(octStr);
    v.add(iterationCount);
    if (keyLength != null) {
        v.add(keyLength);
    }
    return new DERSequence(v);
}
Also used : DERSequence(org.bouncycastle.asn1.DERSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector)

Example 94 with ASN1EncodableVector

use of com.android.org.bouncycastle.asn1.ASN1EncodableVector in project XobotOS by xamarin.

the class PKCS12PBEParams method toASN1Object.

public DERObject toASN1Object() {
    ASN1EncodableVector v = new ASN1EncodableVector();
    v.add(iv);
    v.add(iterations);
    return new DERSequence(v);
}
Also used : DERSequence(org.bouncycastle.asn1.DERSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector)

Example 95 with ASN1EncodableVector

use of com.android.org.bouncycastle.asn1.ASN1EncodableVector in project XobotOS by xamarin.

the class Pfx method toASN1Object.

public DERObject toASN1Object() {
    ASN1EncodableVector v = new ASN1EncodableVector();
    v.add(new DERInteger(3));
    v.add(contentInfo);
    if (macData != null) {
        v.add(macData);
    }
    return new BERSequence(v);
}
Also used : BERSequence(org.bouncycastle.asn1.BERSequence) ASN1EncodableVector(org.bouncycastle.asn1.ASN1EncodableVector) DERInteger(org.bouncycastle.asn1.DERInteger)

Aggregations

ASN1EncodableVector (org.bouncycastle.asn1.ASN1EncodableVector)136 DERSequence (org.bouncycastle.asn1.DERSequence)111 IOException (java.io.IOException)19 DERTaggedObject (org.bouncycastle.asn1.DERTaggedObject)19 X509Certificate (java.security.cert.X509Certificate)12 ArrayList (java.util.ArrayList)12 BERSequence (org.bouncycastle.asn1.BERSequence)12 Enumeration (java.util.Enumeration)11 ASN1EncodableVector (com.android.org.bouncycastle.asn1.ASN1EncodableVector)10 DERBitString (com.android.org.bouncycastle.asn1.DERBitString)10 List (java.util.List)10 DERInteger (org.bouncycastle.asn1.DERInteger)10 DEROctetString (org.bouncycastle.asn1.DEROctetString)9 ASN1Integer (org.bouncycastle.asn1.ASN1Integer)8 DERBitString (org.bouncycastle.asn1.DERBitString)8 DERSet (org.bouncycastle.asn1.DERSet)8 KeyPair (java.security.KeyPair)7 ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)6 PrivateKey (java.security.PrivateKey)5 SignatureException (java.security.SignatureException)4