List of usage examples for org.bouncycastle.asn1 DERSequence DERSequence
public DERSequence(ASN1Encodable[] elements)
From source file:org.cryptoworkshop.ximix.common.asn1.message.NodeInfo.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(name)); v.add(new DERSet(capabilities)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.ParticipantMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(sequenceNo)); v.add(new DERUTF8String(name)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.PermuteAndMoveMessage.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(transformName)); if (keyID != null) { v.add(new DERUTF8String(keyID)); }/* ww w . java2 s . c om*/ v.add(new DERUTF8String(nodeName)); return new DERSequence(v); }
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)); }/*www . j a va 2 s. co 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);/* w ww . j ava 2s.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)); }/* w w w .ja va 2 s . c o m*/ 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); }