Examples of DERInteger


Examples of org.bouncycastle.asn1.DERInteger

     */
    public DERObject getDERObject()
    {
        ASN1EncodableVector v = new ASN1EncodableVector();

        v.add(new DERInteger(1));
        v.add(fieldID);
        v.add(new X9Curve(curve, seed));
        v.add(new X9ECPoint(g));
        v.add(new DERInteger(n));

        if (!h.equals(BigInteger.valueOf(1)))
        {
            v.add(new DERInteger(h));
        }

        return new DERSequence(v);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

     * Reason being as indicated by ReasonFlags, i.e. ReasonFlags.KEY_COMPROMISE
     * or 0 if ReasonFlags are not to be used
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason)
    {
        tbsGen.addCRLEntry(new DERInteger(userCertificate), new DERUTCTime(dateF.format(revocationDate) + "Z"), reason);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

     * set the serial number for the certificate.
     */
    public void setSerialNumber(
        BigInteger      serialNumber)
    {
        tbsGen.setSerialNumber(new DERInteger(serialNumber));
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

  public X9FieldID(
        DERObjectIdentifier id,
    BigInteger          primeP)
  {
        this.id = id;
        this.parameters = new DERInteger(primeP);
  }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    {
        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(digInfo);
        v.add(new DEROctetString(salt));
        v.add(new DERInteger(iterationCount));

        return new DERSequence(v);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    public PKCS12PBEParams(
        byte[]      salt,
        int         iterations)
    {
        this.iv = new DEROctetString(salt);
        this.iterations = new DERInteger(iterations);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    public DHParameter(
        BigInteger  p,
        BigInteger  g,
        int         l)
    {
        this.p = new DERInteger(p);
        this.g = new DERInteger(g);

        if (l != 0)
        {
            this.l = new DERInteger(l);
        }
        else
        {
            this.l = null;
        }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    public RC2CBCParameter(
        int     parameterVersion,
        byte[]  iv)
    {
        this.version = new DERInteger(parameterVersion);
        this.iv = new DEROctetString(iv);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    {
        ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
        DEROutputStream         dOut = new DEROutputStream(bOut);
        ASN1EncodableVector     v = new ASN1EncodableVector();

        v.add(new DERInteger(r));
        v.add(new DERInteger(s));

        dOut.writeObject(new DERSequence(v));

        return bOut.toByteArray();
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERInteger

    JCEElGamalPrivateKey(
        PrivateKeyInfo  info)
        throws IOException
    {
        ElGamalParameter     params = new ElGamalParameter((ASN1Sequence)info.getAlgorithmId().getParameters());
        DERInteger      derX = ASN1Integer.getInstance(info.parsePrivateKey());

        this.x = derX.getValue();
        this.elSpec = new ElGamalParameterSpec(params.getP(), params.getG());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.