List of usage examples for org.bouncycastle.asn1 ASN1EncodableVector ASN1EncodableVector
public ASN1EncodableVector()
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);//from w ww .j ava2s .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)); }//w w w . j a v a2 s. c om 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 w w.jav a 2 s. 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);//from w w w.j a v a2 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 w w w . j av a 2 s . co 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 a2 s .co 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)); }// w w w . j a v a 2 s .c om v.add(new DERUTF8String(nodeName)); return new DERSequence(v); }