List of usage examples for org.bouncycastle.asn1 DERSequence DERSequence
public DERSequence(ASN1Encodable[] elements)
From source file:org.cryptoworkshop.ximix.common.asn1.message.CapabilityMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Enumerated(type.ordinal())); v.add(new DERSet(details)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.ChallengeLogMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new ASN1Integer(index)); v.add(new ASN1Integer(sequenceNo)); v.add(ASN1Boolean.getInstance(hasPassed)); v.add(keyInfo);/*w w w .j av a 2s. c o m*/ v.add(new PointSequence(sourceMessage)); ASN1EncodableVector dv = new ASN1EncodableVector(); for (ECDecryptionProof proof : decryptionProofs) { ASN1EncodableVector proofV = new ASN1EncodableVector(); proofV.add(new DEROctetString(proof.getA().getEncoded(true))); proofV.add(new DEROctetString(proof.getB().getEncoded(true))); proofV.add(new ASN1Integer(proof.getR())); dv.add(new DERSequence(proofV)); } v.add(new DERSequence(dv)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.ClientMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(CLIENT_LEVEL);/*from w w w .j ava 2s . com*/ v.add(new ASN1Enumerated(type.ordinal())); v.add(payload); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.CommandMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(COMMAND_LEVEL);/*www . ja v a 2s .c o m*/ v.add(new ASN1Enumerated(type.ordinal())); v.add(payload); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.CopyAndMoveMessage.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(nodeName)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.CreateBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(boardName)); if (backUpHost != null) { v.add(new DERUTF8String(backUpHost)); }/*ww w . ja va 2 s .co m*/ return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DecryptDataMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); ASN1EncodableVector mv = new ASN1EncodableVector(); for (byte[] message : messages) { mv.add(new DEROctetString(message)); }/*w ww . j ava 2s. c om*/ v.add(new DERUTF8String(keyID)); v.add(new DERSequence(mv)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DecryptShuffledBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(keyID)); v.add(new DERUTF8String(boardName)); v.add(ASN1Boolean.getInstance(isWithPairing)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.DownloadShuffledBoardMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(keyID)); v.add(new DERUTF8String(boardName)); v.add(new ASN1Integer(blockSize)); return new DERSequence(v); }
From source file:org.cryptoworkshop.ximix.common.asn1.message.FetchPartialPublicKeyMessage.java
License:Apache License
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERUTF8String(nodeID)); v.add(new DERUTF8String(keyID)); return new DERSequence(v); }