Example usage for org.bouncycastle.asn1 ASN1EncodableVector ASN1EncodableVector

List of usage examples for org.bouncycastle.asn1 ASN1EncodableVector ASN1EncodableVector

Introduction

In this page you can find the example usage for org.bouncycastle.asn1 ASN1EncodableVector ASN1EncodableVector.

Prototype

public ASN1EncodableVector() 

Source Link

Usage

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));
    }/*w w w  . j a  va2 s.  c  o  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 w w .j a v  a  2  s  . c  o  m*/

    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);
}

From source file:org.cryptoworkshop.ximix.common.asn1.message.FileTransferMessage.java

License:Apache License

@Override
public ASN1Primitive toASN1Primitive() {
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(new DERUTF8String(fileName));

    if (chunk != null) {
        v.add(new DEROctetString(chunk));
    }//from www .j  av  a  2s  .  c o m

    return new DERSequence(v);
}

From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenerationMessage.java

License:Apache License

@Override
public ASN1Primitive toASN1Primitive() {
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(new ASN1Enumerated(algorithm.ordinal()));
    v.add(new DERUTF8String(keyID));
    v.add(keyGenParameters);/*from w  w w  . ja  v a  2 s. com*/
    v.add(new ASN1Integer(threshold));
    v.add(toASN1Sequence(nodesToUse)); // TODO: should be sequence?

    return new DERSequence(v);
}

From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenerationMessage.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  2  s. c om*/

    return new DLSequence(v);
}

From source file:org.cryptoworkshop.ximix.common.asn1.message.KeyGenParams.java

License:Apache License

@Override
public ASN1Primitive toASN1Primitive() {
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(new DERUTF8String(domainParameters));

    return new DERSequence(v);
}