Examples of DSAParameterSpec


Examples of java.security.spec.DSAParameterSpec

    JDKDSAPublicKey(
        DSAPublicKeyParameters  params)
    {
        this.y = params.getY();
        this.dsaSpec = new DSAParameterSpec(params.getParameters().getP(), params.getParameters().getQ(), params.getParameters().getG());
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

        {
            throw new IllegalArgumentException("invalid info structure in DSA public key");
        }

        this.y = derY.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

    JDKDSAPrivateKey(
        DSAPrivateKeySpec    spec)
    {
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

    {
        DSAParameter    params = new DSAParameter((ASN1Sequence)info.getAlgorithmId().getParameters());
        DERInteger      derX = (DERInteger)info.getPrivateKey();

        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

    JDKDSAPrivateKey(
        DSAPrivateKeyParameters  params)
    {
        this.x = params.getX();
        this.dsaSpec = new DSAParameterSpec(params.getParameters().getP(), params.getParameters().getQ(), params.getParameters().getG());
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

    DSAKeyPairGenerator dsakpg = (DSAKeyPairGenerator) kpg;
    msg = "initialize(DSAParams, SecureRandom) MUST succeed";
    try
      {
        dsakpg.initialize(
            new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
            rnd);
        harness.check(true, msg);
      }
    catch (Exception x)
      {
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

      ret = new RSAKeyGenParameterSpec(getKeyLength(pk), rpk.getPublicExponent());
    } else if (pk instanceof DSAPublicKey) {
      log.debug("getKeyGenSpec: DSA");
      final DSAPublicKey dpk = (DSAPublicKey)pk;
      final DSAParams params = dpk.getParams();
      ret = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } else if (pk instanceof ECPublicKey) {
      log.debug("getKeyGenSpec: ECPublicKey");
      final ECPublicKey ecpub = (ECPublicKey) pk;
      final java.security.spec.ECParameterSpec sunsp = ecpub.getParams();
      final EllipticCurve ecurve = new EllipticCurve(sunsp.getCurve().getField(), sunsp.getCurve().getA(), sunsp.getCurve().getB());
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

        spki = new SubjectPublicKeyInfo(ai, ASN1Integer.getInstance().encode(
                y.toByteArray()));
        setEncoding(spki.getEncoded());

        params = (DSAParams) (new DSAParameterSpec(p, q, g));
    }
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

                    .decode(ai.getParameters());
        } catch (IOException e) {
            throw new InvalidKeySpecException(Messages.getString(
                    "security.19B", e)); //$NON-NLS-1$
        }
        params = (DSAParams) (new DSAParameterSpec(new BigInteger(threeInts.p),
                new BigInteger(threeInts.q), new BigInteger(threeInts.g)));

        setEncoding(encoding);

        /*
 
View Full Code Here

Examples of java.security.spec.DSAParameterSpec

        pki = new PrivateKeyInfo(0, ai, ASN1Integer.getInstance().encode(
                x.toByteArray()), null);

        setEncoding(pki.getEncoded());

        params = new DSAParameterSpec(p, q, g);
    }
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.