List of usage examples for org.bouncycastle.asn1 ASN1EncodableVector add
public void add(ASN1Encodable element)
From source file:org.cryptoworkshop.ximix.common.asn1.message.PostedData.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(index)); v.add(new DEROctetString(data)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.PostedMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(index)); v.add(new DEROctetString(message)); if (commitment != null) { v.add(new DEROctetString(commitment)); }// ww w. jav a 2 s . c o m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.PostedMessageBlock.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); for (PostedMessage message : messages) { v.add(message); }/*from w w w .ja v a 2 s. c o m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.PostedMessageDataBlock.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); for (byte[] message : messages) { v.add(new DEROctetString(message)); }//from w w w . j a v a 2 s . com return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.SeedAndWitnessMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DEROctetString(seed)); v.add(new DEROctetString(witness)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.SeedCommitmentMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(boardName)); v.add(new ASN1Integer(operationNumber)); v.add(new DEROctetString(commitment)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.SeedMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(boardName)); v.add(new ASN1Integer(operationNumber)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.ShareMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(sequenceNo)); v.add(shareData);// w w w . j av a 2 s .c o m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.SignatureCreateMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(keyID)); v.add(new ASN1Integer(threshold)); v.add(new DEROctetString(message)); v.add(MessageUtils.toASN1Sequence(nodesToUse)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.StoreMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(id)); v.add(secretShareMessage);//from ww w.jav a 2 s . com return new DERSequence(v); }