protected void engineInit( byte[] params) throws IOException { try { DSAParameter dsaP = DSAParameter.getInstance(ASN1Primitive.fromByteArray(params)); currentSpec = new DSAParameterSpec(dsaP.getP(), dsaP.getQ(), dsaP.getG()); } catch (ClassCastException e) { throw new IOException("Not a valid DSA Parameter encoding."); } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Not a valid DSA Parameter encoding."); } }
protected void engineInit( byte[] params) throws IOException { try { DSAParameter dsaP = new DSAParameter((ASN1Sequence)ASN1Primitive.fromByteArray(params)); currentSpec = new DSAParameterSpec(dsaP.getP(), dsaP.getQ(), dsaP.getG()); } catch (ClassCastException e) { throw new IOException("Not a valid DSA Parameter encoding."); } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Not a valid DSA Parameter encoding."); } }
public BCDSAPrivateKey( PrivateKeyInfo info) throws IOException { DSAParameter params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters()); ASN1Integer derX = (ASN1Integer)info.parsePrivateKey(); this.x = derX.getValue(); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); }
public BCDSAPrivateKey( PrivateKeyInfo info) throws IOException { DSAParameter params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters()); ASN1Integer derX = (ASN1Integer)info.parsePrivateKey(); this.x = derX.getValue(); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); }
JDKDSAPrivateKey( PrivateKeyInfo info) throws IOException { DSAParameter params = new DSAParameter((ASN1Sequence)info.getAlgorithmId().getParameters()); DERInteger derX = ASN1Integer.getInstance(info.parsePrivateKey()); this.x = derX.getValue(); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); }
JDKDSAPrivateKey( PrivateKeyInfo info) throws IOException { DSAParameter params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters()); ASN1Integer derX = ASN1Integer.getInstance(info.parsePrivateKey()); this.x = derX.getValue(); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); }
public BCDSAPublicKey( SubjectPublicKeyInfo info) { ASN1Integer derY; try { derY = (ASN1Integer)info.parsePublicKey(); } catch (IOException e) { throw new IllegalArgumentException("invalid info structure in DSA public key"); } this.y = derY.getValue(); if (isNotNull(info.getAlgorithm().getParameters())) { DSAParameter params = DSAParameter.getInstance(info.getAlgorithm().getParameters()); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); } }
JDKDSAPublicKey( SubjectPublicKeyInfo info) { ASN1Integer derY; try { derY = (ASN1Integer)info.parsePublicKey(); } catch (IOException e) { throw new IllegalArgumentException("invalid info structure in DSA public key"); } this.y = derY.getValue(); if (isNotNull(info.getAlgorithm().getParameters())) { DSAParameter params = DSAParameter.getInstance(info.getAlgorithm().getParameters()); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); } }
JDKDSAPublicKey( SubjectPublicKeyInfo info) { DERInteger derY; try { derY = (DERInteger)info.parsePublicKey(); } catch (IOException e) { throw new IllegalArgumentException("invalid info structure in DSA public key"); } this.y = derY.getValue(); if (isNotNull(info.getAlgorithmId().getParameters())) { DSAParameter params = new DSAParameter((ASN1Sequence)info.getAlgorithmId().getParameters()); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); } }
public BCDSAPublicKey( SubjectPublicKeyInfo info) { ASN1Integer derY; try { derY = (ASN1Integer)info.parsePublicKey(); } catch (IOException e) { throw new IllegalArgumentException("invalid info structure in DSA public key"); } this.y = derY.getValue(); if (isNotNull(info.getAlgorithm().getParameters())) { DSAParameter params = DSAParameter.getInstance(info.getAlgorithm().getParameters()); this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG()); } else { this.dsaSpec = null; } this.lwKeyParams = new DSAPublicKeyParameters(y, DSAUtil.toDSAParameters(dsaSpec)); }
parameters = new DSAParameters(params.getP(), params.getQ(), params.getG());
parameters = new DSAParameters(params.getP(), params.getQ(), params.getG());
parameters = new DSAParameters(params.getP(), params.getQ(), params.getG());
parameters = new DSAParameters(params.getP(), params.getQ(), params.getG());