try {
subjectPublicKeyInfo = (SubjectPublicKeyInfo) SubjectPublicKeyInfo.ASN1
.decode(encoding);
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
"security.19A", e)); //$NON-NLS-1$
}
try {
y = new BigInteger((byte[]) ASN1Integer.getInstance().decode(
subjectPublicKeyInfo.getSubjectPublicKey()));
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
"security.19B", e)); //$NON-NLS-1$
}
ai = subjectPublicKeyInfo.getAlgorithmIdentifier();
try {
threeInts = (ThreeIntegerSequence) ThreeIntegerSequence.ASN1
.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)));