List of usage examples for org.bouncycastle.asn1 DERSequence DERSequence
public DERSequence(ASN1Encodable[] elements)
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.jav a2s .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 w w w. j a va 2 s.co m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TranscriptBlock.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(stepNo)); v.add(details);//from w w w. j a v a2s .co m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TranscriptDownloadMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(queryID)); v.add(new ASN1Integer(operationNumber)); v.add(new ASN1Integer(stepNo)); v.add(new ASN1Integer(type.ordinal())); v.add(new ASN1Integer(maxNumberOfMessages)); v.add(ASN1Boolean.getInstance(withPairing)); if (seed != null) { v.add(new DEROctetString(seed)); }/*from www. j a va 2s .c o m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TranscriptQueryMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(operationNumber)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TranscriptQueryResponse.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(queryID)); v.add(new DERUTF8String(boardName)); ASN1EncodableVector stepV = new ASN1EncodableVector(); for (int i = 0; i != stepNos.length; i++) { stepV.add(new ASN1Integer(stepNos[i])); }/* w w w.ja va2s. com*/ v.add(new DERSequence(stepV)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TranscriptTransferMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(stepNo)); if (chunk != null) { v.add(new DEROctetString(chunk)); }//from w w w.jav a 2s .c om return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.TransitBoardMessage.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))); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.node.crypto.key.message.BLSCommittedSecretShareMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(index)); v.add(new ASN1Integer(value)); v.add(new ASN1Integer(witness)); ASN1EncodableVector factV = new ASN1EncodableVector(); for (int i = 0; i != commitmentFactors.length; i++) { factV.add(new DEROctetString(commitmentFactors[i].toBytes())); }/*from www .j a va 2s . com*/ v.add(new DERSequence(factV)); v.add(new DEROctetString(pK.toBytes())); return new DERSequence(v); }