List of usage examples for org.bouncycastle.asn1 ASN1EncodableVector add
public void add(ASN1Encodable element)
From source file:org.cryptoworkshop.ximix.common.asn1.message.CopyAndMoveMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(BigInteger.valueOf(operationNumber))); v.add(new DERUTF8String(boardName)); v.add(new ASN1Integer(BigInteger.valueOf(stepNumber))); v.add(new DERUTF8String(nodeName)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.CreateBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(boardName)); if (backUpHost != null) { v.add(new DERUTF8String(backUpHost)); }//from w ww .ja va 2 s . c o m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DecryptDataMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); ASN1EncodableVector mv = new ASN1EncodableVector(); for (byte[] message : messages) { mv.add(new DEROctetString(message)); }/*ww w. j a v a 2 s .c om*/ v.add(new DERUTF8String(keyID)); v.add(new DERSequence(mv)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DecryptShuffledBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(keyID)); v.add(new DERUTF8String(boardName)); v.add(ASN1Boolean.getInstance(isWithPairing)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DownloadShuffledBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(keyID)); v.add(new DERUTF8String(boardName)); v.add(new ASN1Integer(blockSize)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.FetchPartialPublicKeyMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(nodeID)); v.add(new DERUTF8String(keyID)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.FileTransferMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(fileName)); if (chunk != null) { v.add(new DEROctetString(chunk)); }/*www . ja v a2s. c o m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenerationMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Enumerated(algorithm.ordinal())); v.add(new DERUTF8String(keyID)); v.add(keyGenParameters);/* www. j a v a 2 s. co m*/ v.add(new ASN1Integer(threshold)); v.add(toASN1Sequence(nodesToUse)); // TODO: should be sequence? return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenerationMessage.java
License:Apache License
private static ASN1Sequence toASN1Sequence(List<String> set) { ASN1EncodableVector v = new ASN1EncodableVector(); for (String name : set) { v.add(new DERUTF8String(name)); }/* ww w. jav a 2s .c o m*/ return new DLSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenParams.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(domainParameters)); return new DERSequence(v); }