use of com.android.org.bouncycastle.asn1.DERSequence 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);
}
use of com.android.org.bouncycastle.asn1.DERSequence 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);
}
use of com.android.org.bouncycastle.asn1.DERSequence 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);
}
use of com.android.org.bouncycastle.asn1.DERSequence 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);
}
use of com.android.org.bouncycastle.asn1.DERSequence in project XobotOS by xamarin.
the class PrivateKeyInfo method toASN1Object.
/**
* write out an RSA private key with its associated information
* as described in PKCS8.
* <pre>
* PrivateKeyInfo ::= SEQUENCE {
* version Version,
* privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
* privateKey PrivateKey,
* attributes [0] IMPLICIT Attributes OPTIONAL
* }
* Version ::= INTEGER {v1(0)} (v1,...)
*
* PrivateKey ::= OCTET STRING
*
* Attributes ::= SET OF Attribute
* </pre>
*/
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new DERInteger(0));
v.add(algId);
v.add(new DEROctetString(privKey));
if (attributes != null) {
v.add(new DERTaggedObject(false, 0, attributes));
}
return new DERSequence(v);
}
Aggregations