List of usage examples for org.bouncycastle.asn1 ASN1EncodableVector add
public void add(ASN1Encodable element)
From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyPairGenerateMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(algorithm.ordinal())); v.add(new ASN1Integer(type.ordinal())); v.add(payload);// www . j a v a2 s . c o m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.MessageCommitment.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(newIndex)); v.add(new DEROctetString(secret)); if (detail != null) { v.add(new DEROctetString(detail)); }/*from ww w .j a v a 2 s .c o m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.MessageReply.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Enumerated(type.ordinal())); if (payload != null) { v.add(payload);/* w ww .j a va 2s.co m*/ } return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.MessageWitness.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(index)); v.add(witness);// ww w. j a va 2 s.c o m return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.MessageWitnessBlock.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); for (MessageWitness message : witnesses) { v.add(message); }/*from ww w . jav a 2 s . c o m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.NamedKeyGenParams.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(NAMED_PARAMETER_SET)); v.add(new DERUTF8String(keyID)); v.add(new ASN1Integer(algorithm.ordinal())); v.add(new DERUTF8String(domainParameters)); v.add(new ASN1Integer(h)); v.add(new ASN1Integer(threshold)); v.add(toASN1Sequence(nodesToUse)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.NamedKeyGenParams.java
License:Apache License
private static ASN1Sequence toASN1Sequence(List<String> set) { ASN1EncodableVector v = new ASN1EncodableVector(); for (String name : set) { v.add(new DERUTF8String(name)); }/* w ww . j a v a 2s .c o m*/ return new DERSequence(v); }
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)); }/*from w w w . j av a2 s .co m*/ v.add(new DERUTF8String(nodeName)); return new DERSequence(v); }